J
John W
I'm sure this is an easy one but I can't seem to figure out my problem. I
have a form("Main") with a listbox ("Payer") and a table("Data") with the
columns "PayerName" & "Comment". I'm attempting to use Dlookup to display a
message box that displays the "Comment" field for the payer chosen from the
list box. Here's what I'm trying:
dim myComment as string
myComment=DLookup("[Comment]","Data","[PayerName] = " & Forms![Main]!Payer)
msgbox mycomment
I keep getting an error saying I have cancelled the last operation? Not
sure what I'm missing here.
Thanks!
have a form("Main") with a listbox ("Payer") and a table("Data") with the
columns "PayerName" & "Comment". I'm attempting to use Dlookup to display a
message box that displays the "Comment" field for the payer chosen from the
list box. Here's what I'm trying:
dim myComment as string
myComment=DLookup("[Comment]","Data","[PayerName] = " & Forms![Main]!Payer)
msgbox mycomment
I keep getting an error saying I have cancelled the last operation? Not
sure what I'm missing here.
Thanks!