
Code from Access 2.0 not working in Access 2000
Thanks for the reply Dan, but my problem is that when I try to run the
code all I get for the SQL is an empty string so it can not be
executed. (I was attempting to use the DoCmd syntax) As I said, the
basic concept functioned in Access 2.0 but I don't know how to update
it for Access2000.
Further up in my code I used the query def to create a make table
query, and then I tried to redefine the SQL and use the same object to
perform a different function I can not get any results.
I'm just a self taught amateur code writer and this has me stumped,
Thanks
Brian
Quote:
> Hi Brian,
> This works in A97.
> Just to check, you do know that to actually
> run the query you must execute it.
> db.Execute(myQdf.Sql)
> hth
> Dan
> > I am updating a database from Access 2.0 to
> > Access 2000. I have a form that runs and event
> > code that I can't get to function. In the code I
> > create a table from existing records and then run
> > an update query to add values to empty fields. I
> > can not manipulate the SQL statement of my
> > temporary query to create an update query in
> > Access 2000.
> > When I run the following code:
> > Set myQdf = myDB.CreateQueryDef
> > ("") 'TempReserveTable
> > myQdf.SQL = "UPDATE ReserveAppend SET
> > ReserveAppend.Prefix = 'V', " _
> > & "ReserveAppend.Suffix = ' ',
> > ReserveAppend.LD = '" _
> > & LD & "', ReserveAppend.Project
> > = '" & Project & "', ReserveAppend.[REMARKS 2]
> > = " _
> > & "'Valve number set aside '" &
> > Date & ";"
> > ReserveAppend to add the desired project name
> > the value of myQdf.SQL is never set to the string
> > and remains empty. Any suggestions would be
> > greatly appreciated.
> > Brian Johnston
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.