Topic: MS Access - Forms questions (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Right-dead center |
posted 12-29-2006 22:11
I figure with all the coder types in here someone might be able to help me out with an Access question. code: Private Sub Command22_Click() DoCmd.OpenForm "frmLicenseAdd", acNormal, , , acFormAdd End Sub
|
Bipolar (III) Inmate From: The Lost Grove |
posted 12-30-2006 00:20
i'd suggest creating a global (or public - depending on who you talk to) variable for the Employee ID number. That way you can reference that employee no matter how many forms you open. If you don't know how to set up global variables in Access, I'll post the instructions. code: Private Sub Command22_Click() gblEmployeeID = me.txtEmployeeID.Value DoCmd.OpenForm "frmLicenseAdd", acNormal, , , acFormAdd End Sub
code: Private Sub Form_Open (Cancel as Integer) me.txtEmployeeID.value = gblEmployeeID End Sub
|
Paranoid (IV) Mad Scientist From: Right-dead center |
posted 01-02-2007 15:28
Thanks Moon. I ended up finding something online right after I posted this. Here's how I did it for future reference: code: DoCmd.OpenForm "frmLicenseAdd", acNormal, , , acFormAdd, , Me!EmployeeID
code: Me!EmployeeID = Me.OpenArgs Me("NextTextboxInTabOrderName").SetFocus Me!EmployeeID.Enabled = False
|