I created a form for people to enter work requests. If someone opens the form the most recent request (cmbid box) appears. Problem is that the rest of the fields are not updating. For instance, someone chooses to create a new request but closes before entering all the info, that person then reopens the form and the correct request id appears..but the fields are filled in with the previous request's info. The afterupdate event works (blank records should appear since the most recent request was not filled in). I tried the "me.[combobox name].requery" on the form load but still nothing happens.
Private Sub Form_Load()
Dim oldid As Double, newid As Variant, rst1 As Recordset, str As String
str = "select [Request ID] from Sales order by [Request ID]"
Set rst1 = CurrentDb.OpenRecordset(str)
oldid = rst1![Request ID]
newid = Val(oldid)
cmbid = newid
Set rst1 = Nothing
The old data is still appearing. I don't understand it. When I click on say, request #1 from the drop down menu, all the fields change to the proper values...but when I add a new record (request #2) and leave the fields blank then close and reopen - #2 appears but the data values from #1 are displayed in the fields.