Hi have a wierd thing happening in my database. I have a form in which you can enter customer details and create a new record for that customer from it.
I also have a button which pops up a modal mini form to select a current customer name and pops that record up back into the customer details form so you can edit current customers details.
To find the matching record I pinched the find record code from a combo box menu I made on another form with the wizard.
I have modifed the code to match the customerid field on the combo box popup, to set a matching bookmark on the customerdetails form.
This is the code:
Dim rs As Object
Set rs = Forms![Customer Details].Recordset.Clone
rs.FindFirst "[CustomerId] = " & Str(Nz(Me![CustomerSearch], 0))
If Not rs.EOF Then Forms![Customer Details].Bookmark = rs.Bookmark
DoCmd.Close
The problem: I open the customer details form and push the button, select a name, the matching record pops up on the customer details form no problems <EXCEPT> when the switch board is open ?!?
It works fine if I open the form and click/select, the mini form closes and wol'a theres the correct record, you beauty.
However if run the customer details form from the switchboard and do the click/select nothing happends on the customer detail form. If i was using the keyword Me! I might understand it but as you can see I reference the customerdetails forms recordset explicitly.
I cant work out why having the switchboard form open would render my record matching on CustomerId suddenly inert?
I also have a button which pops up a modal mini form to select a current customer name and pops that record up back into the customer details form so you can edit current customers details.
To find the matching record I pinched the find record code from a combo box menu I made on another form with the wizard.
I have modifed the code to match the customerid field on the combo box popup, to set a matching bookmark on the customerdetails form.
This is the code:
Dim rs As Object
Set rs = Forms![Customer Details].Recordset.Clone
rs.FindFirst "[CustomerId] = " & Str(Nz(Me![CustomerSearch], 0))
If Not rs.EOF Then Forms![Customer Details].Bookmark = rs.Bookmark
DoCmd.Close
The problem: I open the customer details form and push the button, select a name, the matching record pops up on the customer details form no problems <EXCEPT> when the switch board is open ?!?
It works fine if I open the form and click/select, the mini form closes and wol'a theres the correct record, you beauty.
However if run the customer details form from the switchboard and do the click/select nothing happends on the customer detail form. If i was using the keyword Me! I might understand it but as you can see I reference the customerdetails forms recordset explicitly.
I cant work out why having the switchboard form open would render my record matching on CustomerId suddenly inert?