Experts Exchange connects you with the people and services you need so you can get back to work.
Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.
dim username as String
Dim db as Database
dim myMakeQuery as QueryDef
dim OriginalSql as string
'Sets your variable for the make table to your actual make table query
set MyMakeQuery = db.Querydefs("name of make table query")
'sets the variable to your original sql string with using the word customer as a filler for the username coming from the texbox
OriginalSql = "Select * From tblUsers Where tblUsers.User = customer"
'Gets what is in the original sql string after the word customer has been replaced with what was in the variable username.
db.querydefs("Name of your pass through query").SQL = Replace(originalSql, "customer", username)
MyMakeQuery.Execute 'Executes the make table query which creates your UserOrders table.
'Set your pass through query back to the original if necessary...
db.querydefs("Name of your pass through query").SQL = originalSql
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $148.75.
Premium members get this course for $79.20.
Premium members get this course for $174.99.