Double click

Ok here's a good one.

I have four tables called:- Main Control (Main Form Data), Board
Information (Details about Board Revision), Software Information
(Software relating to the Board Revision) and SF Numbers (a table of
incrementing numbers for ref to the software)

On the Main Control subform i have the fields at the top from the Main
Control Table, then two subforms from the Board and software tables.
All are linked great and you can scroll and all the records change
according to the main Design Number from the Main table.

On the software subform at the bottom i have a field called SF number.
I would like to be able to double click this field and it to go to the
SF numbers table get the last record and plus 1 then store it in both
SF numbers table and in the software information table in the correct
field.

This is so that the same number is never enetered and also for the
user not have to look around for what the last number issued was.

Also what links do i have to create for this?

Possible?
0
Burden
2/19/2008 8:43:31 AM
access.forms 6864 articles. 2 followers. Follow

6 Replies
487 Views

Similar Articles

[PageSpeed] 22

Air code:

Sub MyField_DblClick()
    If Len(Me.MyField & vbNullString) = 0 Then
        MyField = DMax("MyField", "MyTable) + 1
    End If
End Sub
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Burden" <james.burden@sonic-comms.com> wrote in message 
news:60228df0-a4cb-4ede-b210-21dd8f821fc6@p25g2000hsf.googlegroups.com...
> Ok here's a good one.
>
> I have four tables called:- Main Control (Main Form Data), Board
> Information (Details about Board Revision), Software Information
> (Software relating to the Board Revision) and SF Numbers (a table of
> incrementing numbers for ref to the software)
>
> On the Main Control subform i have the fields at the top from the Main
> Control Table, then two subforms from the Board and software tables.
> All are linked great and you can scroll and all the records change
> according to the main Design Number from the Main table.
>
> On the software subform at the bottom i have a field called SF number.
> I would like to be able to double click this field and it to go to the
> SF numbers table get the last record and plus 1 then store it in both
> SF numbers table and in the software information table in the correct
> field.
>
> This is so that the same number is never enetered and also for the
> user not have to look around for what the last number issued was.
>
> Also what links do i have to create for this?
>
> Possible? 


0
Arvin
2/19/2008 2:46:23 PM
That worked great thank you.

So glad that there are people like you out there who know this sort of
thing as i am learning Access now and i wouldn't get very far without
these posts.

Burden

0
Burden
2/20/2008 8:12:37 AM
"Burden" <james.burden@sonic-comms.com> wrote in message 
news:fea24410-b711-4cc0-b327-2c448de44080@u69g2000hse.googlegroups.com...
> That worked great thank you.
>
> So glad that there are people like you out there who know this sort of
> thing as i am learning Access now and i wouldn't get very far without
> these posts.

Fifteen years ago when I was learning Access, Microsoft had free phone 
support. I made intensive use of it. This is one of the ways I am paying 
that debt back.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com 


0
Arvin
2/20/2008 10:06:43 PM
Hi again,
 Just trying to use this database and have noticed that the formula
above is only half working. It is getting the last number and adding 1
then storing it in the software information table when the record is
saved but not saving that new number in the SF numbers table.

Therefore every time i double click the field it gives my the same
number as nothing has changed in the SF numbers table.

i.e. Last number = 120, double click and it gives me 121, double click
the next record and it gives me 121 again

Any ideas?

0
Burden
3/14/2008 9:05:51 AM
"Burden" <james.burden@sonic-comms.com> wrote in message 
news:966b9af2-d760-4865-a585-92553b9dd8dd@e10g2000prf.googlegroups.com...
> Hi again,
> Just trying to use this database and have noticed that the formula
> above is only half working. It is getting the last number and adding 1
> then storing it in the software information table when the record is
> saved but not saving that new number in the SF numbers table.
>
> Therefore every time i double click the field it gives my the same
> number as nothing has changed in the SF numbers table.
>
> i.e. Last number = 120, double click and it gives me 121, double click
> the next record and it gives me 121 again
>
> Any ideas?

Yes, you need to explicitly save the record between double clicks. Are you 
sure you want to do that at this point? If so, just add a line of code like:

Sub MyField_DblClick()
    If Len(Me.MyField & vbNullString) = 0 Then
        MyField = DMax("MyField", "MyTable) + 1
    End If

    DoCmd.RunCommand acCmdSaveRecord

End Sub

If it's not what you want to do, you can create a static form level counter 
and add double-clicks. More complex, but doable.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com 


0
Arvin
3/14/2008 12:38:03 PM
I understand that you would have to save the record, but what i am
saying is that even after it is saved the new SF number is not being
stored in the SF Numbers table where it has looked and added one, only
in the software information table.

Burden
0
Burden
3/14/2008 3:26:28 PM
Reply:

Similar Artilces:

double quotes
Hello, Because of limitations in my finance program, I'll periodically export the data to a text file, import the text file to Excel, where I manipulate the data as required. I then reverse the steps, saving the Excel file as text, then import the new text file back to my finance program. It all works Ok except for one thing - the amounts are stored in the program with a T in front, e.g., 100.00 would be T100.00. The problem is with larger amounts that involve a comma, such as 1,000.00 which would be T1,000.00. Excel insists on saving it with double quotes around it, "T1,000.00&q...

clicker that advances one number per click in a cell
Hi, I'm new to the newsgroup. I hope that someone can help me with a small challenge. After reading the through the help sections, I just can't figure it out. How can I add a "clicker", where every time that I click on a button on a sheet, a cell advances 1 number? My gut feeling is that this is not a simple usage of a formula, but, then maybe there is one? Please help. Thanks for your help. Rayco See reply in .Misc Biff "Rayco" <raycotf@hotmail.com> wrote in message news:bc16d$42f59851$d85678fd$6680@PRIMUS.CA... > Hi, > > I'm new to...

Double email
Keep getting duplicate email? No where to find out how to change that, nothing in options or custom. Nothing in your post to help anyone try to help you. Version of Outlook? Type of account? How many? Did this always happen? When did it start? What did you change just before it started happening? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Barbra <b.kostka@att.net> asked: | Keep getting duplicate email? No where to find out how to | change that, nothing in options or cu...

Visio Hyperlinks
Hi - currently using Visio and would like to save the workflow as a template for others to 'save as' and execute - need to know if the hyperlinks will work within the template and also whether or the current hyperlinks require a 'right click' to execute???? Would like to execute using double click feature? Any advice would be GREAT!! Thanks..../d If you have a Hyperlink on a Shape, then change the formula in the EventDblClick cell in the spreadsheet to =HYPERLINK(Hyperlink.Row_1.Address) "Deb" <Deb@discussions.microsoft.com> wrote in message news:2E...

Creating a Line Chart with double Y Axis
Would be possible to create a Line Chart with double Y Axis on th Chart? The X axis is date and Y axis will be the value. Thannks -- Message posted from http://www.ExcelForum.com Select a series that you want on the secondary axis Choose Format>Selected Data Series On the Axis tab, select Secondary Click OK parker_yuan < wrote: > Would be possible to create a Line Chart with double Y Axis on the > Chart? The X axis is date and Y axis will be the value. Thannks. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

WLM sending duplicate (double) emails
I have an annoying issue with WLM version 14.0.8089.0726 running on W7. Sometimes I send a mail from my MSN.com account and it sits in my Outbox for hours until I close WLM and then reopen it. This results in the mails in the Outbox being sent twice; in the "Account" column for one message it says my MSN mailbox name, and on the duplicate message the "Account" column is blank. Is anyone else having this issue? In Tools|Options on the Send tab, is the "Send messages immediately" box checked? -- Patrick P. www.boydcomputersvcs.com "...

Double the Attachments
Any idea why some of our emails have two copies of each attachment? At first I thought it was a sender fluke, but have recently noticed that some of our own sent e-mail messages, but not all, end up in the 'Sent Mail' folder with twice the attachments they had when originally sent. Do we have an errant setting that could be causing this anomaly? ...

To get the CSliderCtrl to move the just place where user clicked.
I am using CSliderCtrl and there is one thing I want. I want the button to get to the place where the user clicked. In default way, it moves to right or left with page size. So, I tried to calculate the position where the user clicked from the slider's channel rect and mouse position and set the position with SetPos. But there are two problems. (1)The button moves two times when user clicked it every single time. (2)The channel rect is larger than the area where the button is able to move.So I can not calculate the exact position. Any ideas? Thanks!! ...

Can I replace the attachment file when double chick attachment?
I want to replace the attachment when double chick the attachment. I use outlook form to do it. Beause attachment read in outlook is not a cancelable event, I can't do it directly. I found outlook always store attachments file in directory: "%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*". So if I want to replace the attachment when user double chick the attachment, I can repalce the attachment file(will display) in that directory. I have some test, outlook allow me do that. But I meet two question: First: the directory is different with each user, I always start wi...

Owner-draw checkbox and Double-click
Hello, I have an owner drawn checkbox (see my post "Checkboxes: SetCheck() and BS_OWNERDRAW", 8/18/2003). It works great whether the user clicks on it or hits the space bar when it has the focus. However, when the user double-clicks the checkbox and tabs to another control, a heavy black rectangle is left behind. I noticed that this related to my usage of DrawFocusRect() in my DrawItem() function, but I cannot figure out how to properly address the problem. DrawFocusRect is called in two different places in DrawItem(): if( lpDrawItemStruct->itemAction == ODA_DRAWENTIRE ) { ...

Why does one have to click on the cmd button twice
PPT 2003 on Vista .. I have two CMD buttons that I click on one to display new numbers and the second to show the correct answer. I have to click on the second buttoon twice. I don't why becasue on slides from previous files it takes one click to display the data. I tried to match the properties thinking it is a focus issue, but all the properties seem to be the same. I can post the code if it is important. Thanks ... Phil Yes, the code you are using will be helpful. Also, check to see if there is an entrance animation added to the shape you show for the correct ans...

Emails Doubling
People are receiving doubles of my emails. Why is this? Sometimes I receive doubles of others' emails also. "pammor" <pammor@discussions.microsoft.com> wrote in message news:CE3A796F-FC12-4712-9510-8163FB406E73@microsoft.com... > People are receiving doubles of my emails. Why is this? Sometimes I > receive > doubles of others' emails also. Go to the Tools menu>Accounts> ensure that you do not have your account set up twice, if so remove one instance of it. -- Regards Steve. MS-MVP. MAIL. [DTS] UK. http://www.getsafeonline.org...

double-click in between two rows or two columns
How to avoid cursor jumping around to different positions when I double-click in between two rows or two column ? Thanks Hi This is a feature of Excel! When you double click the border of the selected cell, the cursor will go to the edge of the contiguous data on the sheet. It's very useful for jumping to the start/end of data. I don't know of a way to disable it. -- Andy. "Ben" <anonymous@discussions.microsoft.com> wrote in message news:bf5d01c4382c$a19b1bf0$a601280a@phx.gbl... > How to avoid cursor jumping around to different positions > when I double-c...

Double calendar entries
Hello - We are using Outlook 2003. When I get meeting requests - if I accept the request, I get double entries on my calendar. If I decline, I am left with one entry with it saying "You have not responded to this request" but it's still on my calendar... Any help? Thanks Doug ...

double double-click
Hi everyone. Recenlty upgraded all workstations at a client site from Office 2003 to 2007. Some users report that a shortcut to a spreadsheet on their desktop for example requires 2 double-clicks to open. The first double click opens Excel, the second double click opens the spreadsheet in Excel. Very odd. I have checked file associations and all seems OK. Has anyone come across this before or have a solution? TIA Andrew Try activating one on the Excel add-ins, Solver for instance. Andrew Zenz wrote: > Hi everyone. > > Recenlty upgraded all...

Double Buffering in Dialogs
I'm trying to double buffer my dialog as it flickers horribly while resizing. Does any one know how to do this. Any code will be appreciated. Thanks in advance. Wasif Ali Wasif Ali wrote: > I'm trying to double buffer my dialog as it flickers horribly while > resizing. > Does any one know how to do this. > Any code will be appreciated. > > Thanks in advance. > > Wasif Ali What's in the dialog that makes it flicker? The dialog has an ActiveX control and the ActiveX control has many Botmap Buttons on it. Wasif Ali "Minus" <pakosan@ya...

Double Filtering in Excel 2007
Greetings. I am using Excel 2007, and I have a question about filtering in Excel 2007, but I can't find an answer in the help file. If in Col. B I filter a certain cell in a row I get a very handy list. If I then (maintaining the same filter) filter another cell in a row in Col. C I get another handy list (smaller than the first filtered list, of course). Let's say I want to switch back to the first filter, kind of backtracking. I found that when I release the second (sub-)filter, both filters are removed (the same thing happens in Access). Is there an easy way to backtrack...

Double lines
Hi. Can't bare double lines when writing an email. Can anyone please tell me how to go to single lines when using HTML format. Thank you To change to Single line spacing for the selection, just press Ctrl+1. -- Stefan Blom Microsoft Word MVP (Message posted via NNTP) "Dingbat" <askingmany@questions> wrote in message news:3660B584-8A4E-4633-91B5-8F526F83BA6C@microsoft.com... > Hi. > Can't bare double lines when writing an email. > Can anyone please tell me how to go to single lines when using HTML format. > > Thank you ...

Clicking on text box that not revisable
Hi. I have a text box on a form that is not editable by the user. It displays an automated number from the associated table. It's shaded so the user gets the hint that it's not enterable or editable. However, it is enterable if you click on it. It also becomes unshaded when you click on it. You still can't revise the number but I'd like it to not be enterable at all. Any suggestions? -- Sue Programmer/Data Analyst Minnesota Set its Enabled property to No. "Sue" <Sue@discussions.microsoft.com> wrote in message news:18EBC3C9-6F3A-4F7F-AC1F-80DA5593...

CRM email double spacing
We are finding that when pressing Enter key in the CRM email body, it is double spacing the lines. How could we turn this off from doing that? We are not using any templates at the moment. No template. Just out of the box email functionality we are using. Regards, Kyaw Try Alt-Enter Frank Lee Workopia, Inc. http://www.workopia.com >> Other Microsoft CRM Online Forum Resources: http://www.workopia.com/Links.htm >-----Original Message----- >We are finding that when pressing Enter key in the CRM email body, it is >double spacing the lines. How could we turn this off fr...

Outlook 2007 Calender Permissions Context Menu does not open on right-click (only 1 user affected)
Hello, one of our users cannot open the context menu to set calendar permissions in Outlook 2007 (right-clicking on calendar). Hourglass appears and process hangs forever (window does not even appear). Have to use taskman to end it. No events appearing in event viewer that relate in any way :( Further details: xp32, Office 2007 Pro, all patches (2010-06-24) Running Processes, Services, Antivirus and other tools are the same for all users (accessing permissions work for others). No macros running in background. Any clue where to start my search or what to fix? Would be nice if I wouldn&#...

How can I copy Double-Click event behavior to multiple shapes in Visio
Hi, How can I copy the double-click event behavior to many shapes in my Visio drawing? I'd rather not have to visit the ShapeSheet for each shape and paste the formula into the EventDblClick field, since I have a lot of shapes to do this to. Is there a way to do that? Thanks, Joe Either write some VBA code to set the Dbl-Click property or try Visio's ShapeStudio that comes with the SDK kit. John... Visio MVP Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm Need VBA examples? http://www.mvps.org/visio/VBA.htm Common Visio Questions http://www.mvps.org/visio/com...

double account?
When I click Send/Recv, it looks as if Outlook checks the same account twice. What could be the reason? As far as I know I did not add the same account twice (if that would be possible at all). It is not a big problem, but it seems a loss of time. W van Cothen <wvc@sctruqq.nl> wrote: > When I click Send/Recv, it looks as if Outlook checks the same account > twice. What could be the reason? As far as I know I did not add the > same account twice (if that would be possible at all). It is not a > big problem, but it seems a loss of time. How many accounts do you have ...

double click a xls file and start Excel but without the file
I have opened my xls files double clicking it up to now. But now I can not do this. The Excel program strats properly, but it does not open my file, I get a default state as if I closed my all files in the Excel. After that I can open my file from the Excel correctly. So I had to open the file twice and it is very annoying. I got a Office XP. After this problem I have upgraded to Office 2003, but it did not help me. References to extension (e.g. .xls) are good in Windows (the Excel starts correctly) Every xls cause this problem (even the simliest xls file) What is the solution? Can anybod...

Can't right-click in excel
I have a user that showed me the most interesting issue. She is unable to right-click while using Excel. In any other program or even on the desktop she can righ-click and bring up the appropriate right-click menu. But in excel this does not work. is there a setting in Excel that might be causing this problem? -- macquarl ------------------------------------------------------------------------ macquarl's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26388 View this thread: http://www.excelforum.com/showthread.php?threadid=468070 Hi Macquarl, Try this com...