Passing SQL Query Results into a Variable Using VBA

  • Thread starter Thread starter scadav
  • Start date Start date
S

scadav

All,

It has been a long time since I did any access work, so I apologize for the
simple question:

I am trying to write some code that will do something based on whether or
not the data exists in the database. So, I basically want it to proceed
with the code provided that no rows exist in the access tables that meet
the criteria.

So I am trying to run a "select count (*) from TABLE Where COLUMN = "XYZ".
I would like to pass this value into a variable so I can create my if then
statement.

So if = 0 then continue to the next steps. If > 0, then I would like to
display the results so the user can clean them up.

Does that makes? Can anyone help me get this started?

Thanks
 
Back
Top