Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Help

Status
Not open for further replies.

Tommy408

Programmer
Apr 30, 2006
53
US
I need help with a couple of things...

-Find the number of records in a table. I've tried:
"SELECT COUNT(ID) FROM Warnings"
But I don't know how to set it to an integer variable in VBA.
Something like NumberOfID = "SELECT COUNT(ID) FROM Warnings" ?

-How do you specify record source of a specific record in a table. For example Customer table:
ID MEMBER
1 YES
2 NO
3 YES
select First record where Customer is a MEMBER, or Select ONLY Third record where Customer is a MEMBER.


Thank you.
 
See "DCount()" in the VBA help file for more on this

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top