dbmain is not the name of any build in object that I recognise.
Try adding these lines to the top of the procedure:
Dim dbMain as DAO.Database
Set dbMain = CurrentDb()
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Christine" <(E-Mail Removed)> wrote in message
news:5B32A4FC-198D-48C4-8A0D-(E-Mail Removed)...
>I have converted a 97 access database into a 2002 version. I have the
> following references selected: Visual Basic for
> Applications, Microsoft Access 10.0 Object library, OLE Automation and
> Microsoft DAO 3.6 Object library.
> Here are some of my compile issues:
> If gintURSure = True Then
> DBMainInit
> Set qd = dbmain.OpenQueryDef("QUOT_qD_DelQuote")
> qd.Parameters("pQuoteID") = Me![txtQuoteID]
> qd.Execute
> End If
> "dnmain. being the referenced error"
> And then also auto keys defined:
> DoCmd.GoToControl Me![comp_id].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![DATE_SUBMITTED].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![DATE_RECEIVED].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![DATE_ACTION].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![DATE_FFP_RECD].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![DATE_FPP_EFF].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![STATUS].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![date_paid/recd].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![LINE_OF_BUSINESS].name
> fn_Autokeys ("^'")
> DoCmd.GoToControl Me![COMMENTS].name
> fn_Autokeys ("^'")
> "fn_Autokeys referenced error"
> Any suggestions?
>