Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Query adjustment (WHERE)

Hello,

This should be a very easy question.

I have an MDB, where I'm running this query in a command button in VBA.

Currentdb.Execute "INSERT INTO tblInput([Field1], [Field2]) SELECT [Field1], [Field2] FROM tblTransfer

Open in new window


Now, I want to change this query to ONLY insert the records 'WHERE  Field2  IS NOT NULL'
How would I do this?
0
--TripWire--
Asked:
--TripWire--
2 Solutions
 
Nico BontenbalCommented:
Currentdb.Execute "INSERT INTO tblInput([Field1], [Field2]) SELECT [Field1], [Field2] FROM tblTransfer WHERE  Field2  IS NOT NULL"
0
 
rj8820Commented:
You answered it yourself:

Currentdb.Execute "INSERT INTO tblInput([Field1], [Field2]) SELECT [Field1], [Field2] FROM tblTransfer WHERE Field2 is not null"
0
 
--TripWire--Author Commented:
Wow, how about that?? lol Answered my own question!  Thanks anyways.
Easiest points you guys ever made!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now