Getting to the right ID on a continuous form

On a continuous subform, I have a button that opens up a simple form
that allows the user to enter a note for a particular record.

    a field1 field2 [btn]
    b field1 field2 [btn]
    c field1 field2 [btn]
    .
    .
    .

The problem is that if the user clicks, say, the button on the third
record down (c), that opens the note for the first record in the
continuous form (a).  No matter which record's button the user clicks
on the continuous form, it always opens to the first record's note.

What I need to do, I guess, is get the ID of the record that the user
is clicking the button in and use DoCmd.OpenForm to open that
particular record's context note.

Is that correct?  And how do I get the ID of the current record in a
continuous form?


Thanks,
Kevin
0
Kevin
1/25/2010 5:15:34 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
793 Views

Similar Articles

[PageSpeed] 42

Kevin,
    More information about this table, and how it might relate
to others in your app... would be useful but...
    And, a separate button to go to each of multiple records is
unworkable.
    And, you didn't mention how you know which (of multiple records)
you want to go to.

    Some basics...
    You create the ID field in your table design.
    A common method, is an Autonumber field, to give each
record a unique key value.
    In your table example... you could have created an autonumber
field called TransID... each record would have it's TransID value
assigned by Access at record creation.
TransID   Field1   Field2
    1              X         Y
    2              G         Q
    3              B          T
    4              X          T   etc....

    This TransID has nothing to do with any other field in your table that
may be used to link to other tables.  This is just to give each record
a unique key identifying value.
    Now, you can go to any record with just one button.
    Do the OpenForm method, and specify the particular TransID
you're looking for... in the Where argument of the OpenForm.

    DoCmd.OpenForm "X",,, "TransID = " & Me.TransID
-- 
    hth
    Al Campagna
    Microsoft Access MVP 2006-2009
    http://home.comcast.net/~cccsolutions/index.html

    "Find a job that you love... and you'll never work a day in your life."



"Kevin C Niven" <kevincniven@gmail.com> wrote in message 
news:8f24a756-68cf-4c21-ae7b-080f77a5db1c@e37g2000yqn.googlegroups.com...
> On a continuous subform, I have a button that opens up a simple form
> that allows the user to enter a note for a particular record.
>
>    a field1 field2 [btn]
>    b field1 field2 [btn]
>    c field1 field2 [btn]
>    .
>    .
>    .
>
> The problem is that if the user clicks, say, the button on the third
> record down (c), that opens the note for the first record in the
> continuous form (a).  No matter which record's button the user clicks
> on the continuous form, it always opens to the first record's note.
>
> What I need to do, I guess, is get the ID of the record that the user
> is clicking the button in and use DoCmd.OpenForm to open that
> particular record's context note.
>
> Is that correct?  And how do I get the ID of the current record in a
> continuous form?
>
>
> Thanks,
> Kevin 


0
Al
1/25/2010 6:17:15 PM
I dont know what this is about, but im sure it interesting.
"Al Campagna" <newsgroups@comcast.net> wrote in message 
news:eAjFgqenKHA.5524@TK2MSFTNGP05.phx.gbl...
> Kevin,
>    More information about this table, and how it might relate
> to others in your app... would be useful but...
>    And, a separate button to go to each of multiple records is
> unworkable.
>    And, you didn't mention how you know which (of multiple records)
> you want to go to.
>
>    Some basics...
>    You create the ID field in your table design.
>    A common method, is an Autonumber field, to give each
> record a unique key value.
>    In your table example... you could have created an autonumber
> field called TransID... each record would have it's TransID value
> assigned by Access at record creation.
> TransID   Field1   Field2
>    1              X         Y
>    2              G         Q
>    3              B          T
>    4              X          T   etc....
>
>    This TransID has nothing to do with any other field in your table that
> may be used to link to other tables.  This is just to give each record
> a unique key identifying value.
>    Now, you can go to any record with just one button.
>    Do the OpenForm method, and specify the particular TransID
> you're looking for... in the Where argument of the OpenForm.
>
>    DoCmd.OpenForm "X",,, "TransID = " & Me.TransID
> -- 
>    hth
>    Al Campagna
>    Microsoft Access MVP 2006-2009
>    http://home.comcast.net/~cccsolutions/index.html
>
>    "Find a job that you love... and you'll never work a day in your life."
>
>
>
> "Kevin C Niven" <kevincniven@gmail.com> wrote in message 
> news:8f24a756-68cf-4c21-ae7b-080f77a5db1c@e37g2000yqn.googlegroups.com...
>> On a continuous subform, I have a button that opens up a simple form
>> that allows the user to enter a note for a particular record.
>>
>>    a field1 field2 [btn]
>>    b field1 field2 [btn]
>>    c field1 field2 [btn]
>>    .
>>    .
>>    .
>>
>> The problem is that if the user clicks, say, the button on the third
>> record down (c), that opens the note for the first record in the
>> continuous form (a).  No matter which record's button the user clicks
>> on the continuous form, it always opens to the first record's note.
>>
>> What I need to do, I guess, is get the ID of the record that the user
>> is clicking the button in and use DoCmd.OpenForm to open that
>> particular record's context note.
>>
>> Is that correct?  And how do I get the ID of the current record in a
>> continuous form?
>>
>>
>> Thanks,
>> Kevin
>
> 

0
Jerrel
1/25/2010 8:39:31 PM
Reply:

Similar Artilces:

how do I get outlook to go online?
I can't seem to find an answer to my problem. I have installed Microsoft Outlook 2003 but everytime I click on it it says it cannot find a connection to the internet even though I am CONNECTED! Do I have to subscribe to something? Can someone please help. I am fast giving up on Outlook. Thanx. What kind of e-mail account are you using and how did you set it up? -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** "Res" wrote: > I can't seem to ...

Max Limit for Values in List Boxes and Combo Boxes in Outlook forms
Folks, a user is setting up a form. She wants to have several combo boxes and list boxes with between 75 and 300 (yes, 300 -- that's not a typo!) possible values in the combo box or list box. Before she starts work on this, she would like to know if there is a limit on the number of possible values for a combo box or a multi-select list box. Is there a limit? Is it defined by the number of characters in the values box, or the number of actual values? What is the limit? Any help here would be appreciated. Thanks. David consulttech2004@hotmail.com ...

Stop advancing in form with the "next" arrow at end of "list"
I have an editable form for users where they can query by date, etc. However, the next entry arrow allows them to advance beyond the result. For example, if their query resulted in 1 of 4, they can still click to 5, 6, and so on which only adds blank lines to the database table. How do I set this to stop at the last entry of their original query? You can cancel adding new records like this: Private Sub Form_BeforeInsert(Cancel As Integer) Cancel = True End Sub Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Duchess" <Duchess@discuss...

Getting appts to print on one page
I am using calendar assistant to print multiple overlaid calendars at once on letter size paper. All the appointments show up on the first page, except for one. This one pushes to a second monthly page duplicating the first. ie - I get two November 2009s - one with all appts except one and the other page with only the one rogue appointment -- Thanks, Alison ...

Unable to get DxgkDdiRecommendFunctionalVidPn call in windows 7
I am trying to add an initial vidpn topology by implementing the DxgkDdiRecommendFunctionalVidPn call in the WDDM miniport driver. But starting from windows 7 i am unable to get the DxgkDdiRecommendFunctionalVidPn function call from dxgkrnl.After searching through the MSDN documentation i found out that the function is deprecated starting from windows 7. msdn link: http://msdn.microsoft.com/en-us/library/ee220395.aspx According to msdn "On a computer running Windows 7, the display mode manager (DMM) determines an appropriate VidPN topology to apply using VidPN history d...

Resize Forms in Access 2007
I thought I read somewhere that Access 2007 had a new function, or something, enabling you to have forms automatically resize to fit the screen resolution of the user. Is this correct, or am I wrong? If I am correct, how do you use this feature? Thanks, BobV On Aug 9, 8:41 am, "BobV" <rk...@earthlink.net> wrote: > I thought I read somewhere that Access 2007 had a new function, or > something, enabling you to have forms automatically resize to fit the screen > resolution of the user. Is this correct, or am I wrong? If I am correct, how > do you use this feature?...

OWA
SBS 2003 SP1, Exch 2003 SP2, FBA w/ SSL. If I add/delete a calendar event via OWA, I get a 5.1.7 NDR in my Inbox (pasted below). The calendar item is added/delete, and I see it in OWA or Outlook. I haven't seen any other posts similar to this, nothing on MS support. Any clues? ========== Your message did not reach some or all of the intended recipients. Subject: Sent: 12/21/2006 8:24 AM The following recipient(s) could not be reached: System Attendant on 12/21/2006 8:24 AM The e-mail address could not be found. Perhaps the recipient moved to a different e-mail organization, or t...

Form Based Auth.
Hi All, I have checked the option to use form based authentication but I don't get the web page login - still the pop up login box. I have restarted IIS. This is all internal at the moment till i get the forms working. Any ideas. Regards Joe. Do you have "require SSL" checked on the Exchange (and Public) virtual directories in IIS? Have you tried going to the https:// site manually? Forms-based auth only works with SSL. If you haven't required SSL and you go to the http page, it will still work just fine and will pop up the login box. -- Ben Winzenz Exchange MVP ...

Check if Form is Open
I need to check to see if a form is open in the Onclose of another form. And if it is to requery it, if not do nothing. I did find a Function on The Access Web web site but I'm not sure how to utilize the function. Function fIsLoaded(ByVal strFormName As String) As Integer 'Returns a 0 if form is not open or a -1 if Open If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then If Forms(strFormName).CurrentView <> 0 Then fIsLoaded = True End If End If End Function I need to run this in the OnClose of a form to see if frmHome is o...

Can't get my Focus
I have a form(frmProducts) on a tab control object (TabClt) that is on another form(frmOrders). I have a search box on frmProducts that filters "On change" and then keeps its focus in that box. Private Sub txtDescSearch_Change() DoCmd.ShowAllRecords Me.Filter = "Description like '" & txtDescSearch & "*'" Me.FilterOn = True Me.txtDescSearch.SetFocus SendKeys "{F2}" End Sub It works fine when I open frmProducts by itself but when I open the tab it is on from frmOrders. When I enter the first search letter it does fi...

Multi-field search form
Hi there, I am rather new to this place, so I would like to thank you all up front for any and all assistance you may provide. :) It has been a while since I worked with MS Access last. What I am trying to do is create a multi-field search form, where any of the fields can be filled which will display a result set. Preferably if no selection in the fields is made, the entire resultset should be shown - this is not a requirement, though. I seem to be a bit at a loss on how to procede with this task or to find any resources to help me get along. Again, thanks for any and ...

HELP SCREENS, can't get help..
HELP SCREENS, can't get help.. 100723 1900 no pun.. can't get help on how to turn off "TILE" windows if using the term correctly. had seen setting somewhere, to stop Excel from minimizing to a narrow window when help opens (how the heck supposed to compare help to work doing when reducing window on us: cannot read window). where is the setting to stop windows / excel help from resizing to a narrow screen, when you open help. Top left of the help window autotile icon (looks like double page). It toggles between the help andexcel windows being tiled and vo...

How the heck do I find tables, views, forms etc... in Access 2007
Can Access 2007 navigation be any more convoluted? I've been spending close to an hour trying to find a single table, query form, etc... now that the navigation has been changed. Is there a way to get the old style back? It does take some time - more than an hour :-) - to become familiar with the new interface in A2007 (NavPane, ribbon, ...) Suggestions: - The title bar at the top of the Nav Pane includes a tick box for: All Access Objects - Set Category to: Object Type - The categories (Tables, Queries, ...) collapse. - Show and use the Search Bar. It filters objects as...

HELP!!! Can't get forumla figured out!
Hello, This is my first posting to this forum, and I haven't been able to search using the right criteria (not even sure what I would search under) to find what I need so I thought I would post a thread with the question. I have an access query that gives me the results in a spreadsheet layout, with 2 worksheets on it. I need to create a forumla that will look at the data on the 2nd sheet and compare the values in 2 particular columns with the value in one cell on the 1st sheet and populate a different cell on the 1st sheet with a count of entries from the 2nd sheet. If Sheet B, Colu...

show pictures in a form
i am trying to make a database and i have a record that has a hyperlink to a picture i have two question 1) is the hyperlink the best choice to use for the picture 2) how do i make the picture visble on a form thank you for your help sorry i sent this to the wrong newsgroup how every any advice would still be appreciated "William Storey II" <billstorey@sbcglobal.net> wrote in message news:zguub.30991$TL5.30867@newssvr25.news.prodigy.com... > i am trying to make a database and i have a record that has a hyperlink to a > picture > > i have two question > &g...

a document has gone in compatibility mode how do I get it back
I lost a couple of documents that I had saved and was changing the saved title and as I have said the document has gone into compatibility and I cant get it back. ...

How to get total "conditional sum of cells" in a column?
Hi all, I have dollar amounts in one col, and status in another. I want the sum of those dollar amounts where the corresponding status cell is empty (blank). How do I do this? Thanks for any hints, cdj Status in Column A and dollar amounts in Column B: =SUMPRODUCT((A2:A100="")*B2:B100) -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings sandymann2@mailinator.com Replace @mailinator.com with @tiscali.co.uk "sherifffruitfly" <sherifffruitfly@gmail.com> wrote in message news:bc08584b-1338-4b3f-8ab3-cc3e1602e581@n1g2000prb.go...

get/change first operation on table 'uprEmployeeCount' failed
I created a 'test' company on V10, restored the backup from our real company into this test company. I have inactivated all the employees in the test company. Unless I enter Dynamics as sa, I get the following message: A get/change first operation on table 'uprEmployeeCount' failed accessing SQL Data. Under the more info button: [Microsoft][ODBC SQL Server Drive][SQL Server] The EXECUTE permission was denied on the object 'zDP_UPR41600F_1',database 'DYNAMICS', schemo 'dbo'. I have deleted the UPR41600 table and recreated it but I still get the...

Dynamically Setting a forms Input Parameter Property
Hi , I'm working with a ADP project, I have a form where I set the recordset property at design time to a SQLServer stored procedure that has one parameter. If I set the Input Parameter property of the form at design time all is well. However I'd like to be a little more flexible in that I have the calling object that Opens the form using Docmd.Openform pass OpenArgs to the form. On the Form_Open event I set the InputParameter property of form using the value in OpenArgs. The problem is I'm still prompted with the parameter popup..if I press Ok everything continue on and ...

IS size vs EDB file size?? I don't get it!!
I am using Standard version of Ex 5.5. I realize the 16gig limit. My question is I have added up the Kbyte in Ex Admin and it does not come close to the actual size of the priv.edb file. I have done an offline defrag also but did not get any amount of space back. I have been through the MS knowledge base and have read the articles on this subject. The kbyte size is 1.6gig and my edb file size is 14.1gig. What is using over 12gig of space??? Any ideas would be very much appreciated. I don't have 12gig of rules as the MS knowledgebase suggests. "Orlando" <Oplasencia@tp...

Lost Public Folders with Digital ID
Hi, I'm using Exchange 2003 with SP1 and a CA Server. I created my own Digital ID that I installed on my Outlook 2003. Somehow I lost my public folders after the installation. How do I get this back? Please advise. Digital ID is working fine except the above problem. And I got slow response when the root is not offline and subordinate have CRLs to execute. Does root need to be online when CRLs need to be executed? Thanks, Ricky Can you see these folders via another Outlook client? I have never seen a certificate cause public folders to disappear. When you say the root CA is...

Can get UserProperty Names but not Values?
>From C++ using UserProp->Name I can get the name of a UserProperty, but UserProp->Value.bstrVal always returns nothing, anyone have any ideas what I could be doing wrong and has anyone ever accessed UserProperties from C++? UserPropertiesPtr UserProps = Con->UserProperties; if (UserProps->Count > 0) { tot = UserProps->Count; UserPropertyPtr UserProp; for (i=1;i < tot + 1;i++) { UserProp = UserProps->Item(i); MessageBox(NULL,UserProp->Name,"Test - Name",MB_OK); char* sText; sText = (char*)UserProp->Val...

Getting machine name when connecting to db
We have an application in Access 2000, front end/back end design,10-12 users. I want to save the dates and times they enter and exitfrom the app from their workstations in a table in the back end.How do I get the name of their workstation to save to that table? Theworkstations have names like "sales1", "sales2", "Reception", etc.Paul Fenton Add error handling as required. Place in a module and call functionwhen needed.'example by Donavon Kuhn (Donavon.Kuhn@Nextel.com)Private Const MAX_COMPUTERNAME_LENGTH As Long = 31Private Declare Function GetComputerName L...

Digital ID name not found error in Outlook 2003 w/ Exchange 2000
WinXP Pro SP2 fully patched (upgraded from Win2K Pro SP4) Office 2003/Outlook 2003 SP2 fully patched I'm installing company issued certificates in Outlook 2003 for the first time for digital signature and encrypted email. When I try to send email with my digital signature I get the error: Your Digital ID name can not be found by the underlying security system I have removed and reinstalled these certs several times (including system reboots after removal) with no change. I went to thawte.com and got a freemail cert issued but it gives the same error message when I try to use ...

printing to a form
how do i print addresses from excel to an address form page? is i possible? the page came out of an address book and i have to do lik 200 of them. thank -- Message posted from http://www.ExcelForum.com ...