If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro to open a specific record
I am an Access novice and am trying to design an
application using primarily macros. I am able to use forms and buttons to create a decent navigation system. I would also like to associate a macro with a command button to prompt the user for a primary key value and then open a form with that record. I know I can do that with a query, but would prefer to use a macro function directly if that is possible. Any help appreciated, Lloyd |
#2
|
|||
|
|||
Macro to open a specific record
You probably won't find much help on here with macros. Seems kinda silly to
create a macro and then tie it to a button on a form. You would end up with tons of macros. You should place code behind your button. Assuming there is a field on the form which contains the primary key, you could do the following... In the OnClick event, simply enter code similar to... DoCmd.OpenForm "SomeFormName", , , "[PrimaryKey]=" & Me![PrimaryKey] "Lloyd" wrote in message ... I am an Access novice and am trying to design an application using primarily macros. I am able to use forms and buttons to create a decent navigation system. I would also like to associate a macro with a command button to prompt the user for a primary key value and then open a form with that record. I know I can do that with a query, but would prefer to use a macro function directly if that is possible. Any help appreciated, Lloyd |
Thread Tools | |
Display Modes | |
|
|