E
elyse
Hi,
I've typed the following for on a subform using an unbound Combox behind
event AfterUpdate:
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = Me.RecordsetClone
rs.FindFirst "[REVIEW_COURSE]= '" & Me![Combo47] & "' "
If rs.NoMatch Then
MsgBox "No Entry Found.", vbInformation
Else
Me.Bookmark = rs.Bookmark
End If
When the subform is opened the unbound, combobox is populated with the
record(s) that pertain to the userid on the main form. When I click on the
combobox to select a record, if there is an entry found then several text
boxes (on the subform) should be populated with the information found.
However, if "No Entry Found" appears then all of the text boxes should
remain blank.
The Problem:
When I select another record (from the combobox on the subform), the
information in the text boxes don’t go away.
The info from the last search still appears in the fields until I select
another record. And if “No Entry is foundâ€, then the text boxes still have
the same info in them.
What I Need (2 things):
I want the text boxes on the subform to be blank until AFTER I select
another item from the combox (also located on the subform).
When I select another userid, from the main form, I'd like for the fields on
the subform to be blank.
I’ve tried so many things ie:
me!textbox = Null (this overwrites the underlying textbox with Null value)
docmd.runsql.acCommanCreateNew (when the end of the file is reached I get
“Feature is not available)
etc…..
I’ve been working on this for days and am pressed for time.
Please Help.
Thanks
I've typed the following for on a subform using an unbound Combox behind
event AfterUpdate:
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = Me.RecordsetClone
rs.FindFirst "[REVIEW_COURSE]= '" & Me![Combo47] & "' "
If rs.NoMatch Then
MsgBox "No Entry Found.", vbInformation
Else
Me.Bookmark = rs.Bookmark
End If
When the subform is opened the unbound, combobox is populated with the
record(s) that pertain to the userid on the main form. When I click on the
combobox to select a record, if there is an entry found then several text
boxes (on the subform) should be populated with the information found.
However, if "No Entry Found" appears then all of the text boxes should
remain blank.
The Problem:
When I select another record (from the combobox on the subform), the
information in the text boxes don’t go away.
The info from the last search still appears in the fields until I select
another record. And if “No Entry is foundâ€, then the text boxes still have
the same info in them.
What I Need (2 things):
I want the text boxes on the subform to be blank until AFTER I select
another item from the combox (also located on the subform).
When I select another userid, from the main form, I'd like for the fields on
the subform to be blank.
I’ve tried so many things ie:
me!textbox = Null (this overwrites the underlying textbox with Null value)
docmd.runsql.acCommanCreateNew (when the end of the file is reached I get
“Feature is not available)
etc…..
I’ve been working on this for days and am pressed for time.
Please Help.
Thanks