append query if form item is null

Joined
Feb 15, 2010
Messages
3
Reaction score
0
Hello im trying to run a query to move customers from one table to another based off whats entered in the form fields but if say one form field is empty i get a error so in the following



Code:
strSQLApp = "INSERT INTO contacts ([Last Name], [First Name], [Phone], [Business Phone]) VALUES ('" & LName & "', '" & FName & "','" & PhoneNum & "','" & BPhone & "')"

if there was nothing entered for BPhone on the form because the people do not have a Business phone then I get a error and it wont add it to the contacts table :/
 

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