Hello all!
I am using Access 2007. I want to use user forms to enter my data into the tables, blank ones starting from scratch. I have set up my tables already.
1st Question - I cant find a simple answer to this, how the heck do I add data to a table? Lets say i have a textbox call txtbox and a command call cmd. When the user hits the command what is the syntax to load that text into a table called "Job List" in a database called "life"?
This is what I have so far, any tips?
<code>
dim joblist as tabledef
dim life as Database
dim rsMyrs as recordset
set life = opendatabase("lifea.accdb")
Set rsMyrs = life.openrecordset("job list", dbopendynaset)
</code>
That works, but I am lost from there!
Question 2 - The database is in the same project, do I still have to connect to it?
Question 3 - Whats with this "set focus" stuff? In VB I never had to do that, why do I have to do it now? If I have a command that uses if, elseif statments to check if all my textbox's have data in them, I have to use mutiple if statments and re-set my focus before each statment??
Thanks for any help!
Kavy
I am using Access 2007. I want to use user forms to enter my data into the tables, blank ones starting from scratch. I have set up my tables already.
1st Question - I cant find a simple answer to this, how the heck do I add data to a table? Lets say i have a textbox call txtbox and a command call cmd. When the user hits the command what is the syntax to load that text into a table called "Job List" in a database called "life"?
This is what I have so far, any tips?
<code>
dim joblist as tabledef
dim life as Database
dim rsMyrs as recordset
set life = opendatabase("lifea.accdb")
Set rsMyrs = life.openrecordset("job list", dbopendynaset)
</code>
That works, but I am lost from there!
Question 2 - The database is in the same project, do I still have to connect to it?
Question 3 - Whats with this "set focus" stuff? In VB I never had to do that, why do I have to do it now? If I have a command that uses if, elseif statments to check if all my textbox's have data in them, I have to use mutiple if statments and re-set my focus before each statment??
Thanks for any help!
Kavy