unbound textbox value into a table

  • Thread starter Thread starter Steven Scaife
  • Start date Start date
S

Steven Scaife

Hello i have a problem that i am unsure of how to get around.

I have a data entry form that is linked to my customer table, however
depending on the customer type another table is updated. I have a combo box
that allows for the selection of the customer type which then enables two
text boxes allowing for the input.

When i click on the save record button, how do i get it to put the values of
the two text boxes into a different table. Its been two years since i last
coded Access and i have mostly done ASP front ends for any databases i
create. But my dissertation requires an access front end. Do i create a
recordset object like in ASP and add them this way or is there an easier
more subtle approach.

thanks in advance for any help
 
Steven said:
I have a data entry form that is linked to my customer table, however
depending on the customer type another table is updated. I have a combo box
that allows for the selection of the customer type which then enables two
text boxes allowing for the input.

When i click on the save record button, how do i get it to put the values of
the two text boxes into a different table. Its been two years since i last
coded Access and i have mostly done ASP front ends for any databases i
create. But my dissertation requires an access front end. Do i create a
recordset object like in ASP and add them this way or is there an easier
more subtle approach.

Well, you could use a recordset, But I think it's easier to
execute an Update or Insert Into query, depending on what
you're doing

Set db = CurrentDb()
db.Execute "INSERT INTO table (fld1, fld2) VALUES (" _
& Me.txtbox1 & ",""" & Me.txtbox2 & """)", dbFailOnError
Set db = Nothing

for example purposes, I assumed fld1 is numeric and fld2 is
text so you could see how to quote a text value.
 
Back
Top