G
Guest
I'm trying to use the NotInList event on my 'cultures' form to open an
'addNumber' form, use 'addNumber' to add a number to the underlying lookup
table, then return to the main form. Here is my sticking point:
DoCmd.OpenForm addNumber, acNormal, , , acFormAdd, acDialog, NewData
This command opens the 'addNumber' form, and allows user to fill in the
desired number (and subsequent fields), but I can't seem to get the NewData
argument to pass to the form. I've tried all types of contortions with the
events associated with the 'addNumber' form to populate the txtNumber text
box with the NewData value. When I set a break point within the 'addNumber'
form I see that NewData = 0, but when I look in the 'cultures' code NewData
has the value typed in by the user.
When I remove acDialog from the .OpenForm command I can manipulate the text
box value and set it appropriately with the following:
DoCmd.OpenForm addNumber, acNormal, , , acFormAdd, acDialog, NewData
Forms!addNumber.txtNumber = NewData
Of course, then I have problems getting the combo box to requery when the
'addNumber' form closes.
Any ideas?
'addNumber' form, use 'addNumber' to add a number to the underlying lookup
table, then return to the main form. Here is my sticking point:
DoCmd.OpenForm addNumber, acNormal, , , acFormAdd, acDialog, NewData
This command opens the 'addNumber' form, and allows user to fill in the
desired number (and subsequent fields), but I can't seem to get the NewData
argument to pass to the form. I've tried all types of contortions with the
events associated with the 'addNumber' form to populate the txtNumber text
box with the NewData value. When I set a break point within the 'addNumber'
form I see that NewData = 0, but when I look in the 'cultures' code NewData
has the value typed in by the user.
When I remove acDialog from the .OpenForm command I can manipulate the text
box value and set it appropriately with the following:
DoCmd.OpenForm addNumber, acNormal, , , acFormAdd, acDialog, NewData
Forms!addNumber.txtNumber = NewData
Of course, then I have problems getting the combo box to requery when the
'addNumber' form closes.
Any ideas?