Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL over access

Author  Topic 

eadward
Starting Member

6 Posts

Posted - 2006-05-10 : 13:05:01
Hi!
I'm trying to make an access form to add registers to a table, nut I receive some problems. This is the code:

DoCmd.RunSQL ("insert into custom(date,concept,inv,inv2,out,buy,bq) values (""&me.date&"",""&me.concept&"",""&me.inv&"",""&me.inv2&"",""&me.out&"",""&me.buy.text&"",""&me.bq.text&"");")

There date, concept, inv, inv2 and out are "text fields" linked to the 'custom' table, and buy and bq are combobox.
1-The register is added correctly, but the first one is erased too. The 'custom' table does not have a primary key defined, but I think that's not the problem.
2-I tried the calling to me.forms with some variations, but it keeps rewriting the register or it rewrites the register adding the 'me.date' (as a text, not the me.date content)

If someone knows where I'm messing up, please, help me to fix it.
Thanks
   

- Advertisement -