Hi, I am writing a program to accept multiple user inputs and put these values into a table. This database will end up having hundreds of tables, each table should have the user inputted data.
I have created the table and set the fields to their propper values. The problem I encounter is when I try to input the user data (stored in my global variables userStart, userEnd, userCircuit etc etc) into the proper fields. Here is what I have. I have removed the code in which I attempted to add these values to the fields becuase I believe it was not even on the right path to working.
I did not include the entire program, this is just a small part. I was hoping somone had an idea of how I can take my variables and input them into the propper fields (e.g. I want my variable userStart to be under the "Cable Start" field.
Thank you,
Seth
I have created the table and set the fields to their propper values. The problem I encounter is when I try to input the user data (stored in my global variables userStart, userEnd, userCircuit etc etc) into the proper fields. Here is what I have. I have removed the code in which I attempted to add these values to the fields becuase I believe it was not even on the right path to working.
Code:
'Sub-function to create a table using the data the user had input
Sub CreateTable()
Dim dbs As Database, tbl As TableDef, fld As Field
'Create reference to the database
Set dbs = CurrentDb
'Specify table name
Set tbl = dbs.CreateTableDef(userStart & "," & userEnd)
'Create Fields for table
Set fld = tbl.CreateField("Cable Start", dbText)
tbl.Fields.Append fld
Thank you,
Seth