D
Damien McBain
This should be easy but she no working.
2 forms: frmDateEntry and frmCustLookup
On frmDataEntry there are many controls, in particular, a bound text box
called "ICust" and an unbound textbox called Lookup.
The Lookup textbox has an afterupdate event which opens the other form
(frmCustLookup) and filters it based on the contents of Lookup.
frmCustLookup returns a list of customers matching the string in "Lookup".
All this works perfectly.
The on double click event of the text boxes on frmCustLookup is:
Private Sub CustName_DblClick(Cancel As Integer)
On Error GoTo AwwwShit
'===============================
Dim daNumba
daNumba = CustNo
DoCmd.Close
Forms!frmDataEntry!ICust.SetFocus
ICust = daNumba
'MsgBox daNumba
'===============================
gtfo:
Exit Sub
AwwwShit:
MsgBox Err.Description, , "F.A.C.T.S."
Resume gtfo
End Sub
It's supposed to populate ICust with the variable "daNumba".
The problem is that ICust is not being updated (even though the variable
daNumba is being set to the right value.
What am I doing wrong?
Damo
2 forms: frmDateEntry and frmCustLookup
On frmDataEntry there are many controls, in particular, a bound text box
called "ICust" and an unbound textbox called Lookup.
The Lookup textbox has an afterupdate event which opens the other form
(frmCustLookup) and filters it based on the contents of Lookup.
frmCustLookup returns a list of customers matching the string in "Lookup".
All this works perfectly.
The on double click event of the text boxes on frmCustLookup is:
Private Sub CustName_DblClick(Cancel As Integer)
On Error GoTo AwwwShit
'===============================
Dim daNumba
daNumba = CustNo
DoCmd.Close
Forms!frmDataEntry!ICust.SetFocus
ICust = daNumba
'MsgBox daNumba
'===============================
gtfo:
Exit Sub
AwwwShit:
MsgBox Err.Description, , "F.A.C.T.S."
Resume gtfo
End Sub
It's supposed to populate ICust with the variable "daNumba".
The problem is that ICust is not being updated (even though the variable
daNumba is being set to the right value.
What am I doing wrong?
Damo