A
AccessFreak via AccessMonster.com
Ok... I'm going to try this again using the appropriate language...
Table = "resp" (Columns id_resp, make, model)
Form = "test" (queries "resp" based on List3.Column(0) - Therefore no records
are returned on load)
Listbox = List3 (queries "resp")
List3.Column(0) = id_type
List3.Column(1) = make
List3.Column(2) = model
id_rep (textbox populated by form query)
make (textbox populated by form query)
model (textbox populated by form query)
Label8 (Label with OnClick command)
OnClick command:
Private Sub Label8_Click()
Me.id_resp.SetFocus
DoCmd.Save acForm, "Test"
Dim i As Integer
If List3.ListCount = 0 Then Exit Sub
For i = 0 To List3.ListCount - 1
List3.Selected(i) = False
Me.List3.Requery
Next i
End Sub
Ok... here's the situation:
1. Open Form - no records (desired result)
2. Click Record in List3, Form requeries, textboxes populated - desired
results
3. Alter info "make" or "model", click Label8.
Results:
1. Table is updated properly and successfully
2. List3 does not properly requery to display correct information.
3. I have noticed that as soon as the DoCmd.Requery or Me.List3.Requery is
used, List3 "re-highlights" the record and I cannot properly requery to
update List3 as long as that particular record is highlighted.
4. If I select another record and click "Label8", then List3 properly
requeries and displays the right information.
Let me know if it's clear as mud and you need more information. This is a
test I have thrown together and am disregarding proper naming conventions,
etc for the sake of getting the process correct first. Thank you.
Table = "resp" (Columns id_resp, make, model)
Form = "test" (queries "resp" based on List3.Column(0) - Therefore no records
are returned on load)
Listbox = List3 (queries "resp")
List3.Column(0) = id_type
List3.Column(1) = make
List3.Column(2) = model
id_rep (textbox populated by form query)
make (textbox populated by form query)
model (textbox populated by form query)
Label8 (Label with OnClick command)
OnClick command:
Private Sub Label8_Click()
Me.id_resp.SetFocus
DoCmd.Save acForm, "Test"
Dim i As Integer
If List3.ListCount = 0 Then Exit Sub
For i = 0 To List3.ListCount - 1
List3.Selected(i) = False
Me.List3.Requery
Next i
End Sub
Ok... here's the situation:
1. Open Form - no records (desired result)
2. Click Record in List3, Form requeries, textboxes populated - desired
results
3. Alter info "make" or "model", click Label8.
Results:
1. Table is updated properly and successfully
2. List3 does not properly requery to display correct information.
3. I have noticed that as soon as the DoCmd.Requery or Me.List3.Requery is
used, List3 "re-highlights" the record and I cannot properly requery to
update List3 as long as that particular record is highlighted.
4. If I select another record and click "Label8", then List3 properly
requeries and displays the right information.
Let me know if it's clear as mud and you need more information. This is a
test I have thrown together and am disregarding proper naming conventions,
etc for the sake of getting the process correct first. Thank you.