PDA

View Full Version : Microsoft ACCES - INSERT INTO - CurrentDB


imported_philippe
09-18-2003, 09:47 AM
Hi,
I write this code but do not ok because dbs variable have got 'Nothing' value. I don't why ?

My code :

Dim dbs As Database

Code_Frs = Code.Value

Set dbs = CurrentDb

dbs.Execute "INSERT INTO LFB1 (ALTKN) VALUES ('" & Code_Frs & "');"
dbs.Execute "INSERT INTO LFBK (Code) VALUES ('" & Code_Frs & "');"
'dbs.Execute "INSERT INTO LFM1 (Code) VALUES ('" & Code_Frs & "');"

dbs.Close

Could you help me ?

gish
09-18-2003, 12:44 PM
ummm....ok.....this post belongs in the SQL forum..
--
but regardless...dbs is nothing....what is "CurrentDb" assigned?