I have a problem with a DLOOKUP statement.
This is the statement I have at the moment:
, "[Advisor] =" & Chr(34) & Me.cboAdvisor & Chr(34) & " And [Date_of_month] = #" & DateSerial(2004, Val([Forms]![frmAdmin_Shif
nth]), 1) & "#")
If I select "9" in cboMonth and "Joe Bloggs" from cboAdvisor this should return any records that match "Joe Bloggs" and "1/9/2004" in my table.
However, it keeps throwing errors for syntax or "invalid use of null" when I try and show the RecordID in a msgbox command.
What I want to do is use an IF statement to either INSERT or UPDATE the value into teh table. ie:
DLOOKUP - check if record exists
If Dlookup = true then
sSQL = "INSERT INTO tblRecords_Shift_Details ( Month_Number, Advisor, Shift_Status, Experience_Level, Date_of_Month ) SELECT [Forms]![frmAdmin_Shifts]!
sSQL = "Update into blah blah"
Any help, please.....?