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.
Display a count number in a Access Report into a Text Box on Access form
Long Text change to rich text still only allows 255 characters in ACCESS 2016 db
Use variable to SELECT records in a recordset
Microsoft Access 2010: ComboBox text extraction / search
“Couldn't find Instalable ISAM” VB6 Data Control to Access DB
Access Navigation Control BrowseTo "The command or action 'BrowseTo' isn't available now. Error 2046
Add a record (that does not already exist) to a table from a userform
Access 2010 report invoice total
linked table xxx is unavailable. Microsoft access cannot contact the server
Does this Dlookup have incorrect syntax?
How to combine two fields in Form to one field from Microsoft Access?
Report building from selection in datasheet
Multiple arguments IsNull function MS Access VBA
how to pass parameters to ExportWithFormatting using vbscript
Access 2010 cascading combo boxes runtime error 424