dada display from query

R

Rani

I wrote a query based on a query filtered by the value of an unbound combo
box, the form is a continues form, displaying all the relevant lines of info
for a particular salesperson.
while running a requery, the form still display the data base on the
previous query.
any idea ?
 
E

Ed Robichaud

If you're changing the records/values in the data source after a form has
opened, you'll need to requery that data source for the form to display any
new/changed data.
-Ed
 
R

Rani

that's what i am doing
on the unbound combobox
i have and afterupdate event
me.requery
yet the old data isn't eliminated from the form
just the additional lines (if exist) are being added
 
E

Ed Robichaud

Not sure what you're using the combobox for, but typically on a continuous
style form, a combobox in the form header would be used as a "locator" to
select a particular record. Below is an example:

Private Sub Locate_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![Locate], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me![Name].SetFocus
[Locate].Value = Null

End Sub

Another typical setup is to use a single record form as a Main form, then a
related child Sub form (as continuous or datasheet) to show related info.

A "Refresh" or "Show All Records" command should display the filtered
records.
-Ed
 
Top