Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access97

Status
Not open for further replies.

rta

MIS
May 1, 2001
13
0
0
US
I have five linked tables, I want to be able to enter data on a form that updates all the tables automatically that have the same fields. What need I do?

Thanks in advance.
 
I have a db that I have several linked tables also. All you need to do is create a form and then when you create the text boxes on that form you set their control source to the table it will be affecting. Here's a bit of the code that I used:

Dim lstName As String
Dim rsOnsite As Recordset
Dim rsEquipUsed As Recordset
Dim rsTechInUse As Recordset
Dim rsTechTable As Recordset
Dim db As Database
Dim ctl As Control
Dim varItem1 As Variant
Dim varItem2 As Variant

Set db = CurrentDb
Set rsOnsite = db.OpenRecordset("zJobTable")
Set rsEquipUsed = db.OpenRecordset("EquipmentUsed")
Set rsTechInUse = db.OpenRecordset("TechniciansInUse")
Set rsTechTable = db.OpenRecordset("Technicians")

rsOnsite("Customer") = Me.cbCustomer
rsOnsite("Start Date") = CDate(Me.txtStartDate)
rsOnsite("End Date") = CDate(Me.txtEndDate)
rsOnsite("Phone #") = Me.txtCustomerPhone
rsOnsite("Contact") = Me.txtContact
rsOnsite("PO#") = Me.txtPO
rsOnsite("Description") = Me.txtDescription
rsOnsite("Notes") = Me.txtNotes
rsOnsite("CustomerID") = Val(Mid(Me.cbCustomer, InStr(1, Me.cbCustomer, "-- ", vbTextCompare) + 2))

rsOnsite.Update

Mind you that rsOniste is just one table. You would have to dim for all of the tables and then set the text box control sources to the soecific table. I hope this is what you're looking for...if not just disregard :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top