B
Bongard
I have looked at numerous other posts trying many differerent syntax'
but I cannot seem this dlookup formula to work.
I have a two fields on a form [Bill] which is a combo box lookup to
the table [master] and field [LP name]. The second field I have that
need the dlookup is cusip, which is also in the master table. I am
trying to get the dlookup to populate the Cusip text box once the [LP
name] is selected from the combo box [Bill]. This is what I have right
now:
You can see that the top var3 is a trial with a different syntax from
another post. The bottom formula is what I am currently trying and
getting the error message after the update of the combo box saying
"Runtime error 3075. Syntax error (missing operator) in query
expression '[LP Name]=Francisco Partners'."
Where Francisco Partners is the LP name chosen
Private Sub Bill_AfterUpdate()
'var3 = DLookup("[Cusip]", "Master", "[LP Name]="" & Me!Bill & """")
Dim var3 As String
var3 = DLookup("[Cusip]", "[Master]", "[LP Name]=" & Forms!
Frm_MiscTranInfo![Bill])
Me!Text42 = var3
End Sub
Any help or suggestions would be much appreciated!
Thanks,
Brian
but I cannot seem this dlookup formula to work.
I have a two fields on a form [Bill] which is a combo box lookup to
the table [master] and field [LP name]. The second field I have that
need the dlookup is cusip, which is also in the master table. I am
trying to get the dlookup to populate the Cusip text box once the [LP
name] is selected from the combo box [Bill]. This is what I have right
now:
You can see that the top var3 is a trial with a different syntax from
another post. The bottom formula is what I am currently trying and
getting the error message after the update of the combo box saying
"Runtime error 3075. Syntax error (missing operator) in query
expression '[LP Name]=Francisco Partners'."
Where Francisco Partners is the LP name chosen
Private Sub Bill_AfterUpdate()
'var3 = DLookup("[Cusip]", "Master", "[LP Name]="" & Me!Bill & """")
Dim var3 As String
var3 = DLookup("[Cusip]", "[Master]", "[LP Name]=" & Forms!
Frm_MiscTranInfo![Bill])
Me!Text42 = var3
End Sub
Any help or suggestions would be much appreciated!
Thanks,
Brian