|
-
Jun 26th, 2000, 09:28 PM
#1
Thread Starter
Addicted Member
I have the following code:
***********************************
Dim sForm as string
If sForm = "A" then
A.ADOD1.Recordset = "SQLQuery"
end if
If sForm = "I" then
I.ADODC1.Recordset = "SQLQuery"
end if
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The only difference between the two IF statements is the Form Name of either A or I at the begining of the .ADODC1 statement. I hope there is a way to eliminate the IF statements so that the code looks like the following:
***********************************
Dim s as string
s = "A" (or I may want it to be "I")
S.ADOD1.Recordset = "SQLQuery"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
This way I can eliminate the if statements. How do I do it so that S represents the proper ADODC1 control on the proper form???
Thanks for any help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|