karmacable
Registered User.
- Local time
- Today, 06:04
- Joined
- Sep 13, 2011
- Messages
- 32
Jeez, I've gotten so spoiled using the macros for simply opening a form, I'm now having problems simply writing it into VBA (Access's "convert macro to VBA" button doesn't work very well)?!
Okay, this should be really simple but my syntax for SQL and opening code isn't tops. Here's the info;
My current form: frmProject -> uses tblProject -> ProjectID (PK-Number)
Form to open: frmReport -> source also uses tblProject
Anyways, the user simply wants to click on command button and have frmReport come up with some of the information already shown for Billybob on frmProject, AND have some extra info show up (which will come from some coding I wish to do in the 'click' event for the command button, again don't worry about that).
So to my logical thinking, the syntax for this procedure looks like this;
Anyways, feel free to illustrate where my idiot logic is going wrong.
Thanks,
Okay, this should be really simple but my syntax for SQL and opening code isn't tops. Here's the info;
My current form: frmProject -> uses tblProject -> ProjectID (PK-Number)
Form to open: frmReport -> source also uses tblProject
currently has only two textboxes copied from frmProject -> txtProjectID & txtProject (for the project name)
While a user is cruising along from record to record in frmProject, let's say he/she stops at record 13 for the project called "BillyBob" (record 12 for BobbySue and record 14 for Cletus just weren't as interesting)!
Anyways, the user simply wants to click on command button and have frmReport come up with some of the information already shown for Billybob on frmProject, AND have some extra info show up (which will come from some coding I wish to do in the 'click' event for the command button, again don't worry about that).
So to my logical thinking, the syntax for this procedure looks like this;
But I'm getting a 'Enter Parameter Value' prompt for txtProject. I just want the record for BillyBob to show, I do not want the user to be prompted!DoCmd.OpenForm "frmReport", , , "txtProject=" & Me!ProjectID
Anyways, feel free to illustrate where my idiot logic is going wrong.
Thanks,