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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Queries in VB6

Status
Not open for further replies.

theservant

Programmer
Aug 27, 2003
5
ZA
I have a Access database connected to ado control. IS there a way that I can create a query in runtime and even edit a query in runtime through vb?
 
Looks like you're using an ADODC control. Just set it's CommandType property to adCmdText. You can then set its CommandText property in code:

Adodc1.RecordSource = "SELECT myField FROM myTable where postcode like 'c%'"
Adodc1.Refresh


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'

for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top