Help w Compile Error please
- From: "David M via AccessMonster.com" <u3970@uwe>
- Date: Mon, 13 Feb 2006 20:17:39 GMT
I have a form with a command button 'cmdXfer'.
In the procedure for cmdXfer_Click I have the following code (among other
code):
DBEngine.Workspaces(0).BeginTrans
CurrentDb.Execute "INSERT INTO [tjctDistributions] (" & _
"fkautLeadID, fkautSaleID, intDistrNum, dtmDistrDate, "
& _
"fkstrDistrType, dtmXfered, fkautEmployeeID,
strBrokerName, " & _
") VALUES (" & _
Me.pkautLeadID & ", " & _
Me.cboSaleID & ", " & _
intNextDistrNum & ", " & _
pfGetSQLDate(Now()) & ", " & _
"'XML', " & _
pfGetSQLDate(Me.txtDateXfered) & ", " & _
Me.cboEmployeeID & ", " & _
"'" & Me.txtBrokerName & "'" & _
")", dbFailOnError
DBEngine.Workspaces(0).CommitTrans
I'm getting 'COMPILE ERROR: SUB OR FUNCTION NOT DEFINED'' on each of the 'Me.
' references. They are definitely valid fields/controls on the current form.
They even appear automatically after typing 'Me.'. If I substitutute (hard-
code) a number for any of them, the error moves past to the next 'Me.'
reference. If I type them with the field names but without the actual 'Me.'
then I still get the same error.
Thanks in advance for your help,
David
--
Message posted via http://www.accessmonster.com
.
- Follow-Ups:
- Re: Help w Compile Error please
- From: Tom Lake
- Re: Help w Compile Error please
- Prev by Date: Help with ALTER TABLE statement
- Next by Date: Re: Help w Compile Error please
- Previous by thread: Help with ALTER TABLE statement
- Next by thread: Re: Help w Compile Error please
- Index(es):