Let me try to explain. We get a list emailed to us about once a week fro what we are going to run. Each order has 4 relevant fields. Model, serial, CTL, and HVAC. We get this as an Excel spreadsheet laid out something like this..
Monday Tuesday Wednesday Thursday Friday
M,S,C,H M,S,C,H M,S,C,H M,S,C,H M,S,C,H
M,S,C,H M,S,C,H M,S,C,H M,S,C,H M,S,C,H
Monday Tuesday Wednesday Thursday Friday
M,S,C,H M,S,C,H M,S,C,H M,S,C,H M,S,C,H
M,S,C,H M,S,C,H M,S,C,H M,S,C,H M,S,C,H
There are 30 items per day so I made a query to import from Excel one section at a time and set an id number so that I can get them in order. My new table, "Schedule" looks like this.
ID M,S,C,H
ID M,S,C,H
ID M,S,C,H
ID M,S,C,H
So I now have table with 5 fields and many records rather than many fields and fewer records. Now the supervisor opens a form and it immediately asks him for the first order he will work on. That will be (S). The form looks something like this...
Station Model Serial Ctl Hvac ID
Station Model Serial Ctl Hvac ID
Station Model Serial Ctl Hvac ID
Station is just a text box with a value that will be added to the next step, Model,serial,CTL,and HVAC are listboxes and id is a text box. This all populates from a query that puts the id number in the first ID field. The supervisor can change any id field and the ones after it will repopulate (There's a whole lot of vba doing this but I'm kinda new at this and If I can find a way that works I use it). So now that I've explained all that I've forgotten my original question. LOL. My VBA of...
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("select * from Daily")
rec.AddNew
rec("Line Position") = Me.Text522
rec("Model") = Me.Listrs1
rec("serial") = Me.Listrs2
rec("ctl") = Me.Listrs3
rec("Hvac") = Me.Listrs4
rec("Run Date") = Me.Text561
rec("first") = Me.Shift
rec.Update
Set rec = Nothing
Set db = Nothing
updates my text boxes into the correct fields as new records in a table but my list boxes do not. The new table will be the "historical record" of what was run and when since all the other tables actually delete records before adding new ones.