G
Guest
I am trying to fill a text box by pulling data without using a query. I am
trying to do this because I and the client do not want 288 queries.
The last reply off of my last post gave this code:
Me.Text582=dlookup("TempAverage","Average","Month=" & me.txtMonth & " And
Year=" & me.txtYear)
somewhere in this there is a syntax error. I also want to state that the
names of the fields have been changed because I now know they are reserved
words.
The table TempTransfer Average, now has three fields:
TransferMonth
TransferYear
TransferAverage
I tried to change the code to this:
strMonth = 10
strYear = 2004
Me.Text585 = DLookup("[TransferAverage]", "TempTransferAverage",
"TransferMonth = " & strMonth And " TransferYear = " & strYear)
Yet, now I get a type mismatch error.
Does anyone know how to fix this error and fill a text box using code
instead of a query?
Thanks in Advance,
Elena
trying to do this because I and the client do not want 288 queries.
The last reply off of my last post gave this code:
Me.Text582=dlookup("TempAverage","Average","Month=" & me.txtMonth & " And
Year=" & me.txtYear)
somewhere in this there is a syntax error. I also want to state that the
names of the fields have been changed because I now know they are reserved
words.
The table TempTransfer Average, now has three fields:
TransferMonth
TransferYear
TransferAverage
I tried to change the code to this:
strMonth = 10
strYear = 2004
Me.Text585 = DLookup("[TransferAverage]", "TempTransferAverage",
"TransferMonth = " & strMonth And " TransferYear = " & strYear)
Yet, now I get a type mismatch error.
Does anyone know how to fix this error and fill a text box using code
instead of a query?
Thanks in Advance,
Elena