C
Chris
I use my main client form's client-selector combo box NotInList event to add
a new client and to open a data entry client details form. The combo box is
updated with the new client ID.
Closing the client details form I open another data entry (greater) client
details form.
Closing the greater client details form I want to return the user to the
main client form with the newly added record displayed. The code I have
gleaned from these postings follows:
Dim frm As Form
Set frm = Forms![1frmClient]
frm.Requery
With frm.RecordsetClone
.FindFirst "ClientID=""" & Me.ClientID & """"
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
With this code I get the message asking user if they want to add the new
user (the same message from the main client form's combo box). Not surprised
-- requery.
When I remove it I am left at the main client form record at the first
record in the table, while the combo box contains the newly added client ID.
I am only able to access this new record after closing the form (or
restarting db).
Am I requerying in the wrong place? Other issue with the code?
a new client and to open a data entry client details form. The combo box is
updated with the new client ID.
Closing the client details form I open another data entry (greater) client
details form.
Closing the greater client details form I want to return the user to the
main client form with the newly added record displayed. The code I have
gleaned from these postings follows:
Dim frm As Form
Set frm = Forms![1frmClient]
frm.Requery
With frm.RecordsetClone
.FindFirst "ClientID=""" & Me.ClientID & """"
If Not .NoMatch Then frm.Bookmark = .Bookmark
End With
Set frm = Nothing
With this code I get the message asking user if they want to add the new
user (the same message from the main client form's combo box). Not surprised
-- requery.
When I remove it I am left at the main client form record at the first
record in the table, while the combo box contains the newly added client ID.
I am only able to access this new record after closing the form (or
restarting db).
Am I requerying in the wrong place? Other issue with the code?