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
754 Views

Similar Articles

[PageSpeed] 48

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:

i get error 404 not found when trying to download
I'm trying to download nokia pc suite to windows xp to upload gallery onto the computer but get error message404 not found - how can i download this pc suite please -- Krysy Albutt Krysy Albutt wrote: > I'm trying to download nokia pc suite to windows xp to upload gallery > onto the computer but get error message404 not found - how can i > download this pc suite please Care to enlighten us how this pertains to: - 1) Microsoft 2) Publisher 3) Windows If you're having problems downloading from the *NOKIA* site where do you think you should be directing your ...

How can I keep a maximized form maximized?
Hi All, I have a form I want maximized. I added DoCmd.Maximize to the form Open event. I set the property sheet for no min max buttos, but a minimize button still shows up next to the close button (which I have to have. Is there a majic spell I can use in VB to hide the min button? Second to making it go away, can I trap it and stop it from happening? Thanks, Max Hi Max, Are you sure you set the option minimize and maximize to none because if you did you shouldn't see neither option. Reading your post it looks like you have opted for only showing the minimize op...

How to know if a form is loaded?
I saw this in my textbook, but I can't remember where and I haven't been able to find it (the texbook has more than 1000 pages). When I'm not looking for it, it will be right there in front of me, I'm sure. Maybe somebody knows this off the top of their heads? In Access 2000 and later, test: CurrentProject.AllForms("Form1").IsLoaded In any version: SysCmd(acSysCmdGetObjectState, acform, "Form1") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than all...

Using Outlook Custom Forms through OWA
Hi all, Is there any way to implement this? We have an Exchange 2003 server with Sp2. Users out of office hope to use outlook custom forms through OWA. Can this be done? ...

How to get Calendar to send me reminders
I have changed my e-mail address but for some reason I cannot get Calendar to send reminders to my new address - I think I have carried out all that is necessary to effect the changover but I am not getting reminders sent. Can anyone help please? Is the Calendar Live ID based and accessible at Calendar.live.com ? -- ....winston ms-mvp mail "Dabardevon" wrote in message = news:FDC2B3B2-EDE4-41B1-BFC4-C0F9ED59CFB9@microsoft.com... I have changed my e-mail address but for some reason I cannot get = Calendar to send reminders to my new address - I think I have...

Some recipients get the attachment, some get winmail.dat
This one has me baffled. We are using Exchange 2000 and Outlook 2000 and have been for 8 months. No previous problems with attachments (.doc, .xls, .jpg). About 2 weeks ago, we started hearing from certain recipients that the attachment wasn't arriving; instead they were getting an unreadable file called winmail.dat. MS says that this is because the sender is using Rich Text to format the email. We have changed the senders to use Plain Text and still have the same problem. If the email is sent to several recipients, some will get the attachment fine, some will not. This didn'...

How to get the CScrollBar's Handle in CTreeCtrl?
Hey,All: I thought I have a problem when I trid to get the CScrollBar's handle from my CTreeCtrl extended handle. Can anybody tell me whether I can get the handle of the CScrollBar from the CTreeCtrl? Thanks in advance! Carl :-| Carl wrote: > Hey,All: > > I thought I have a problem when I trid to get the CScrollBar's handle from > my CTreeCtrl extended handle. > Can anybody tell me whether I can get the handle of the CScrollBar from the > CTreeCtrl? > > Thanks in advance! > Carl > :-| > > Sorry, it is not that simple. The scroll bars that...

A Crystal Beginner
I am using Crystal 9.2.4.77 and have loaded the Crystal enhancements. Now I want to do against the CRM database. What do I do? I thought I would create a data source to the CRM SQLserver, which I did, then connect to it through Crystal Reports. That works, but when I drill down on the AAA_MSCRM database to choose my tables, it shows me dbo as the only option (where did this come from??) and under that are just a few generic tables. No CRM tables. Something's not quite right. What am I missing? file - log on to aps server "KBLawson" <klawson@aetinc.com> wrote in ...

Detect if MDB has autoexec or a startup form
Does anyone know of way to detect if a MDB has a autoexec or startup form in use without openned the MDB using access.exe. Many thanks in advance Function StartUp(PathToMDB As String) As String On Error GoTo EH Dim db As DAO.Database Dim strMessage As String Dim strStartForm As String If Len(Dir(PathToMDB)) > 0 Then Set db = OpenDatabase(PathToMDB) strStartForm = db.Properties("StartUpForm") If Len(strStartForm) > 0 Then strMessage = PathToMDB & " specifies " & _ strStartForm & " for startup." &...

Cannot get fast forward or fast reverse to work with WMP 11
I am running Vista Home Premium on a HP G 217-EM Notebook which comes pre-installed with Windows Media Player 11. When I play cds and try to fast forward or fast reverse by keeping the fast forward or fast reverse buttons constantly depressed nothing happens. Why is this, and can anyone come up with a solution? Many thanks This doesn't work on my system either, so it's probably just a limitation of WMP. Fast forward and fast reverse should work fine when you rip the CD's to MP3 or WMA files, and play these files instead. Regards -- Tim De Baets http://www....

Get paid while you get online!!
I found a great Internet company - Cashfiesta.com - that has created a product everyone can benefit from. They pay you while you work or play on your computer. All you need to do is keep their software - the FiestaBar=99 - active while you are online. They even pay you when your friends are using their computers. Unlike other companies, Cashfiesta gives you control over how much money you earn. They have an individual payrate based on the number of Special Offers you sign up for. As some of these offers are free, you can increase your payrate up to 33 times without spending a penny. It's...

Payables Integration and Checkbook ID
We have several checkbooks in each of our companies. I use Integration Manager to import non-GP checks and invoices into GP 8.0 Payables. In my source file I specify a particular checkbook ID, for example, 30. In the Destination Mapping I map Checkbook ID to the checkbook ID column in my source file. I also specify the integration to add a batch. After I successfully run the integration, I go into the Purchasing module, call up the newly integrated batch and I find that the Checkbook ID field has a value of 4 (our default checkbook) rather than 30, which I specified in the integration....

Add new record using first available non-numeric ID; update two ta
Access 2003, Windows XP Pro SP2 I have two tables, tblDed and tblVendor. tblDed contains two columns (DedID and Avail). The first column contains a list of all DedIDs allowed to be used. The second is a Yes/No choice indicating whether or not that DedID has been used already. tblVendor contains multiple columns with misc. data relevant to the Vendor. I want to create a form that will accomplish three things: 1. Use the next available unused DedID when a command button on a referring menu page (frmMenu, btnNew) is pressed. 2. Mark the now-used DedID in tblDed as "No" - no ...

Can't get auto-update (update) to install
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC I've been trying to manually check for updates to Word 2008, and I get a &quot;critical update&quot; notice, asking me to install auto-update. When I try to install it, I cannot. It just keeps repeating the attempt, in an &quot;endless loop.&quot; What to do? <br> Thank you. ...

Spreadsheet getting corrupted
Hello All: I have a relatively large spreadsheet. I am getting errors (see after my signature line). What could be causing these errors? Is it that the spreadsheet is too large? Thanks Deguza -------------------------------------------------------- Microsoft Office Excel File Repair Log Errors were detected in file 'C:\Documents and Settings\deguza\My Documents\sales\Sales_2006_2007.xls' The following is a list of repairs: Global PivotTable report information was repaired due to integrity problems. Global PivotTable report information was repaired due to integrity problems. Glo...

Outlook 2003 and Custom Form
I have many problems with Outlook 2003 and Coustom Form: frmCache.dat not UpDated Error when i open this form Ecc.ecc. There is a fix or a patch ( italian language ) for these problem. Thanks Claudio ...

Reg getting the next IV Document Number field !
Hi, I am creating a window in dexterity similar to the item transaction entry window (Transactions>Inventory> Transaction Entry). In the Item transaction Entry window, the Document number field defaults to the next document number when we move the focus to that field. I wanted to know if there is any function , or table that i can access to get the next document number in the new window that i am creating. Thanks, swetha -- swetha >In the Item transaction Entry window, the Document number field defaults to the next document number when we move the focus to that field.< T...

How do I get??
Sorry if this seems a fairly easy question to you guys. I have a spreadsheet and I need to get the current system time into a cell. The format of the time is hh:mm am/pm. Any assistance would be most helpful. Hi try =INT(NOW()) in this cell and format is to your needs -- Regards Frank Kabel Frankfurt, Germany PM wrote: > Sorry if this seems a fairly easy question to you guys. > > I have a spreadsheet and I need to get the current system time into a > cell. The format of the time is hh:mm am/pm. > > Any assistance would be most helpful. PM, in the cell you want pu...

How to clear all checkboxes on a form?
That's it. How is it possible to create push-button functionality that resets all checkboxes to empty? Also, is it possible that pushing a button could increase a counter, or light up a first, second and third cell, that would then be reset by the button I asked for above? I thank you for your time. Arlen For Each ctl In Me.Controls If TypeName(ctl) = "CheckBox" Then ctl.Value = False End I Next ctl -- HTH Bob "Arlen" <Arlen@discussions.microsoft.com> wrote in message news:700CD724-30FB-4D93-AF50-451FB658502...

Get notified when Out of Office is on
I am using Outlook 2007. With 2003, when returning from leave, I used to get a notification that the Outlook out of office was still on and asking me if I wanted to switch it off. This reminder no longer appears with 2007. How can I switch this setting on so that I get the notification? "Mary Ann" <MaryAnn@discussions.microsoft.com> wrote in message news:ED5533A7-D0EA-41B8-B1A0-A9D15FB6FD98@microsoft.com... >I am using Outlook 2007. With 2003, when returning from leave, I used to get > a notification that the Outlook out of office was still on and asking me ...

No mapping between account names and security IDs was done. 11-10-05
"No mapping between account names and security IDs was done. SOAP Server Application Faulted" Removed licenses from other users that are no longer here. I cannot add the new users. any ideas what the error messages mean? ...

Getting Control ID in Active X control
GetWindowLong return 0. You need to call GetDlgCtrlID from outside the activex control as the function available within the control returns an arbitrary value of zero. Take a look at this article http://xendra.ens.uabc.mx/~sinfante/loo/libro/ch17_4.htm particularly the paragraph preceeding the title "MFC and Ambient Properties". This really begs the question why you want the ID in the first place as activex controls have to be fully self containing to operate - with a few exceptions where sibling controls need to be able to locate each other. - Tim "ytv" <...

problems copying invoice form but then changing to a different font
I've downloaded an Invoice form (in .doc format) but the downloaded version has a font where all the letters appear unnaturally compressed. I've tried to change it to a more readable font (select all, then changed font to Arial, size to 10). Now the letters/font look good but the different lines and text entries are in the wrong positions. It looks like the size of the original page won't accomodate the new font and parts of the text have shifted to incorrect positions. If this is just a page size problem, how would I go about adjusting the new document before I change...

over VPN, it gets stuck when sending outgoing email
When I use VPN to connect to work from home, the outlook can not finish sending outgoing emails. The progress bar moves to the end but then stops there forever. It can never finish. The receiving of new incoming emails work fine. All other network functionality works, e.g. internet browsing, telnet, ftp, etc, all work fine. My system is win2k. I use linksys wireless DSL router. I'd appreciate any hint! Are you using Exchange server? I'd set up your mail profile to prompt you to work offline or online - when using VPN, work offline with scheduled syncs. If not using exchange, pos...

Get photos from a camera
I have an asp.net intranet application that I need to upload 1 or all photos from a digital camera at a PC workstation. We are using DataGrids and GridViews to display them on the web once they are uploaded but need something at the client. I assume I need some sort of ActiveX process or something. Has anyone run into a solution for this need? Thanks. -- David "DavidC" <dlchase@lifetimeinc.com> wrote in message news:2B061F4F-B548-4AA4-96FA-2F87383192D2@microsoft.com... > I have an asp.net intranet application that I need to upload 1 or all > photos ...