I am having trouble setting the default value in a textbox called txtDate on a form I call frmConfirmUpdate. I want to fill the textbox with the Date from my table called tblData which contains the Date and a unique identifier called MonthlyID. I would like to enter the MonthlyID into a textbox called txtMonthlyID and have the textbox (txtDate) display the corresponding Date. My best guess as to how to do this is to enter the following into the textbox's Default Value property:
=(SELECT [tblData].[Date] FROM [tblData] WHERE ((([tblData].[MonthlyID]) = Me![txtMonthlyID])))
However, I get the following error: #Name?
Any ideas on what I'm doing wrong?
Thanks in advance.
Kal-EL
=(SELECT [tblData].[Date] FROM [tblData] WHERE ((([tblData].[MonthlyID]) = Me![txtMonthlyID])))
However, I get the following error: #Name?
Any ideas on what I'm doing wrong?
Thanks in advance.
Kal-EL