add a row to table

K

Ken Sutcliffe

How do I code to automatically add an empty row to the db
in a specified table.

It would be great if you can

Many Thanks

Ken Sutcliffe
 
S

Steve Schapel

Ken,

You mean completely empty? Only way I can think of is...

CurrentDb.Execute "INSERT INTO YourTable ( AField ) VALUES ( ' ' )"
CurrentDb.Execute "UPDATE YourTable SET AField=Null WHERE AField=' '"

This would assume that a blank record is in fact permitted, i.e. no
Primary Key field, no 'required' fields, no applicable Validation Rules,
etc, so this is very unusual!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top