Hi,
I'm an Access 2000 user
I have almost solved one problem only to find that i'm stuck on a part of it.
Scenario
I have a form [studfinder] which finds students, a combo box is used to find students and when the user types in the combo box the form updates to display the record for the student. If the student doesnt exist then it prompts the user to add the student or retype.
If the user adds the student it opens the [StuAdd] form where the students full details can be added.
I'm using the Not In List event of the combo box. I have managed to get Access to send the newdata through to the form but then when the rest of the details are entered and the [stuadd] form is closed the combo box is not refreshed or requeried this is because I used a
AcDataErrContinue, and opened the form in normal mode rather than dialog, so that I could send the info through to the [stuAdd] form. I found that if I open the form in dialog mode then once the data is entered on the stuadd form it will requery the combo box upon return to the original [studfinder] form.
[the problem]
Opening the form in dialog mode is good as I use the AcDataErrAdded and the combo box is requeried automatically upon return to the orignal form, but I cant find a way to send the newdata through to the stuAdd form.
Anyhelp appreciated.
the code is given below.
------------------------------
start of code
------------------------------
Dim msg, Strfname, StrSurname As String
Dim TwoNames
msg = "Would you like to add " & newdata & " ?"
If MsgBox(msg, vbYesNo) = vbNo Then
SendKeys "{esc}"
Else
DoCmd.openform "FRM_StudDets", acNormal, , , , acDialog, NewData
Response = acDataErrAdded
End If
End Sub
------------------------------
end of code
------------------------------
Any help would be appreciated
Idd
I'm an Access 2000 user
I have almost solved one problem only to find that i'm stuck on a part of it.
Scenario
I have a form [studfinder] which finds students, a combo box is used to find students and when the user types in the combo box the form updates to display the record for the student. If the student doesnt exist then it prompts the user to add the student or retype.
If the user adds the student it opens the [StuAdd] form where the students full details can be added.
I'm using the Not In List event of the combo box. I have managed to get Access to send the newdata through to the form but then when the rest of the details are entered and the [stuadd] form is closed the combo box is not refreshed or requeried this is because I used a
AcDataErrContinue, and opened the form in normal mode rather than dialog, so that I could send the info through to the [stuAdd] form. I found that if I open the form in dialog mode then once the data is entered on the stuadd form it will requery the combo box upon return to the original [studfinder] form.
[the problem]
Opening the form in dialog mode is good as I use the AcDataErrAdded and the combo box is requeried automatically upon return to the orignal form, but I cant find a way to send the newdata through to the stuAdd form.
Anyhelp appreciated.
the code is given below.
------------------------------
start of code
------------------------------
Dim msg, Strfname, StrSurname As String
Dim TwoNames
msg = "Would you like to add " & newdata & " ?"
If MsgBox(msg, vbYesNo) = vbNo Then
SendKeys "{esc}"
Else
DoCmd.openform "FRM_StudDets", acNormal, , , , acDialog, NewData
Response = acDataErrAdded
End If
End Sub
------------------------------
end of code
------------------------------
Any help would be appreciated
Idd