D
doodle
Greetings all.
windows xp, access 97
I have created a main "switchboard" type menu with command buttons on
the left and an unbound subform on the right. If they click on the
"Enter Order" button, the source object for the subform is changed to
the Order Entry form.
All works well.
The problem is that I have created a search command at the top of the
switchboard menu where the user can enter a customer number to search
for and, in a perfect world, the subform would become visible with the
record for that customer number. I coded it so that it works to open
the form, but I don't want to open the form as a separate object, I
want it to be the source object of the unbound subform.
Search command button code:
Private Sub cmdSearch_Click()
Dim stLinkCriteria As String
stLinkCriteria = "[CustNum]=" & "'" & Me![optSearch] & "'"
DoCmd.OpenForm "frmOrderEntrySearch", , , stLinkCriteria
End Sub
Code to show source object, not sure how to modify to show the above:
Me!sbfMain.Visible = True
Me!sbfMain.SourceObject = "frmOrderEntrySearch"
Thanks in advance.
-doodle
windows xp, access 97
I have created a main "switchboard" type menu with command buttons on
the left and an unbound subform on the right. If they click on the
"Enter Order" button, the source object for the subform is changed to
the Order Entry form.
All works well.
The problem is that I have created a search command at the top of the
switchboard menu where the user can enter a customer number to search
for and, in a perfect world, the subform would become visible with the
record for that customer number. I coded it so that it works to open
the form, but I don't want to open the form as a separate object, I
want it to be the source object of the unbound subform.
Search command button code:
Private Sub cmdSearch_Click()
Dim stLinkCriteria As String
stLinkCriteria = "[CustNum]=" & "'" & Me![optSearch] & "'"
DoCmd.OpenForm "frmOrderEntrySearch", , , stLinkCriteria
End Sub
Code to show source object, not sure how to modify to show the above:
Me!sbfMain.Visible = True
Me!sbfMain.SourceObject = "frmOrderEntrySearch"
Thanks in advance.
-doodle