Brian/Mike/Dave I am have been working on this project in bits and pieces
and have been learning a lot about Access. Thanks for your input and
willingness to help me.
I am entering the data on a subform.
Main form: frm Clients Entry.
Subform: sbfrmAdmissionNewReadmit.
The quick search combo box on the header of this form/subform is Combo3,
which I designed using the combo box wizard.
I then move to another form and tabbed subforms and enter data in the
subform. Main form: frm Client Enter Codes Hours.
Subforms: sbfrm tab nonRtss Service Info and sbfrm tab RTSS Hours.
The quick searchcombox box on the header of this form/subform is Combo55,
which I designed using the combo box wizard.
If I open my database, add a record, and move through all the forms, no
problem.
Everything shows up in the combo boxes without saving or refreshing. The
Quick Search combo boxes work perfectly. EVERYTHING WORKS PERFECTLY AND i
DON'T NEED TO SAVE OR REFRES.
HOWEVER, after I add the first record, if I return to enter another new
client on the first form/subform, and then move to the second set of
form/subforms to enter data, problems start to occur. I can refresh and/or
save between form moves, and the new name shows up in the combo box, but the
record does not change to the same as the combo box. I can save everything
as I go along, refresh as I go along, nothing makes the combo box on the
second set of form/subforms bring up the record. I added a requery of
combo55 to the Open Form command button which opens the second set of
form/subforms. That didn't work. Any ideas?
(I am just using the menu bar to refresh and save so far. Since this isn't
working, I haven't built these into any macros. By the way, I don't see
"Refresh" in any macro list.)
Thanks a lot for all your ideas and help. MEYSS
If helpful, here is the code for the combo55 which I find on the "After
Update" line of Events on Properties. I haven't written VBA before, so most
of this code doesn't make much sense to me. But here it is:
Option Compare Database
Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NewReadmitID] = " & Str(Nz(Me![Combo15], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo19_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NewReadmitID] = " & Str(Nz(Me![Combo19], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub btn_Return_to_Client_Entry_Click()
On Error GoTo Err_btn_Return_to_Client_Entry_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm Clients Entry"
stLinkCriteria = "[Client ID]=" & Me![Client ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btn_Return_to_Client_Entry_Click:
Exit Sub
Err_btn_Return_to_Client_Entry_Click:
MsgBox Err.Description
Resume Exit_btn_Return_to_Client_Entry_Click
End Sub
Private Sub btn_Enter_Visit_Hours_Click()
On Error GoTo Err_btn_Enter_Visit_Hours_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm Enter Visits Hours"
stLinkCriteria = "[NewReadmitID]=" & Me![NewReadmitID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btn_Enter_Visit_Hours_Click:
Exit Sub
Err_btn_Enter_Visit_Hours_Click:
MsgBox Err.Description
Resume Exit_btn_Enter_Visit_Hours_Click
End Sub
Private Sub btn_Switchboard_Click()
On Error GoTo Err_btn_Switchboard_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Switchboard"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_btn_Switchboard_Click:
Exit Sub
Err_btn_Switchboard_Click:
MsgBox Err.Description
Resume Exit_btn_Switchboard_Click
End Sub
Private Sub QuickSearchCodeForm_AfterUpdate()
End Sub
Private Sub Combo55_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NewReadmitID] = " & Str(Nz(Me![Combo55], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo57_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NewReadmitID] = " & Str(Nz(Me![Combo57], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo59_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NewReadmitID] = " & Str(Nz(Me![Combo59], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
[quoted text clipped - 40 lines]
quick
search combo list in the header.