MS Access Syntax error
here is my code: Text22 = DLookup("[Program_No]", "1_Supportive_Housing", "[Program_Name] = '" & Replace([Me.Program_Name], "'", "''") & "' And [BudgetYear] = " & [Me.BudgetYear]) I am not sure what is wrong with it, but it keeps giving me the following error: Can't find the field | in your expression I have been trying to get rid of this error but nothing works. OnKeyPress, this event triggers. As the user writes, it should be able to lookup the value in the table and assign it to text22.
Looks like you want to reference to form fields [Me.Program_Name] & [Me.BudgetYear], but Access tries to find fields with exactly this name, including "Me." prefix. Try to remove brackets at all, or use Me.[Program_Name] and Me.[BudgetYear] instead.
SQL SELECT Query on related table
Assistance with combo box using lookup table - MS Access
MS access : how to add 1 row between 2 rows?
Access 2010 Error Accessing the system registry
How to edit subform based on joined tables in Access 2010
Textfield in Access 2003 query replaced by squares and asian symbols
Where do I put Access vba code to only fire when physically printing?
Loop through Access tables
Pass Parameter to Stored Procedure
Access 2007 VBA GoToRecord issue
MS Access 2012 Unresponsive to clicks when it has focus on citrix
Error 3155 (ODBC--insert on a linked table 'SAMPLE' failed)
I keep on getting an error 13 type mismatch error, How can I get it out?
MS Access Mark Duplicates in order of appearance
MS access: how to embed JPEG images and preview them?
Problems implementing basic VBA in Access 2007