I am having problems with one of the forms, as the code which worked with Access is obviously wrong for sql.
specifically,
code as follows
Expand|Select|Wrap|Line Numbers
- If NewRecord=True Then
- SectionName="Item Search code"
- qry2="select top 1" &_
- "DeceasedID, DateOfEntry from dbo_AllFields where "&_
- "format(DateOfEntry, "yyyy-mm-dd"")='" & Format(DateOfEntry, "yyyy-mm-dd")&-
- "'and DataEntryBy= '" & CurrentUser &_
- "'and Dec_cn='" & Dec_cn &_
- "'andFamilyna='" & Familyna & "'" & _
- "order by DeceasedID desc"
- Set rs = CurrentDb.openrecordset(qry2)
- mDeathID = rs!DeceasedID
- lblDeceasedID.Caption =mDeathID
- End If
Please help.
thanks