|
-
Aug 18th, 2000, 11:56 AM
#1
Thread Starter
Member
I have a question. I have 5 tables in a database how do i access them without using 5 differant data controls like i have check boxes and if that is checked then i want it to open that table so i can write to that table? if anyone can help me that would be great
-
Aug 18th, 2000, 12:23 PM
#2
You mean change the RecourdSource?
Code:
Data1.RecordSource = "Employees"
Data1.Refresh
-
Aug 18th, 2000, 12:29 PM
#3
Lively Member
Code:
Dim sTableName As String
Select Case CheckBoxArray
Case CheckBoxArray(0)
sTableName = "First_Table"
Case CheckBoxArray(1)
sTableName = "Second_Table"
Case CheckBoxArray(2)
sTableName = "Third_Table"
'and so on
End Select
'Then use the table name in you SQL statement
'to insert records into that table
-
Aug 18th, 2000, 12:45 PM
#4
Thread Starter
Member
yes that is exactly what i want now whats the code i saw some but im not sure exactly with sql
-
Aug 18th, 2000, 01:20 PM
#5
Monday Morning Lunatic
You mean like this:
Code:
rst.RecordSource = "TableName"
rst.AddNew
rst.Fields("Field1").Value = "xxx"
rst.Fields("OtherField").Value = 5
rst.Update
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|