Not sure what to do next...

G

Guest

Hi -

I have a form:

My heading contains 1 list box field called ASSY1. It is unbound and gets
it's data from a query which gets me the distinct ASSY1 fields.

My detail has the following fields:
ASSY, PART, VDESC, UM, BOM_ID, REF, QPA, PROJECT, COMMENTS, RELEASED

They come from the ps_table and the im_table. I set these up to be actual
fields not unbound.

On the ASSY1 field, I have placed the following a code on the AFTER_UPDATE
event. I had wanted to attach it to a command button, but could not find one
which would work.

Private Sub ASSY1_AfterUpdate()
Dim cSQL As String
If Len(assy1) > 0 Then
cSQL = "SELECT psf_table.ASSY, psf_table.PART, im_table.VDESC,
im_table.UM,"
cSQL = cSQL & "psf_table.BOM_ID, psf_table.REF, psf_table.QPA,
psf_table.PROJECT, "
cSQL = cSQL & "psf_table.COMMENTS, psf_table.RELEASED "
cSQL = cSQL & "FROM psf_table, i WHERE psf_table.ASSY = "" Me!Assy1"
cSQL = cSQL & " and psf_table.PART = im_table.PART "
cSQL = cSQL & "ORDER BY psf_table.PART"
End If

End Sub


So now I am a bit lost.
* Am I using the correct method to produce a query screen where the user
enters a value in a unbound field and display those items which are
equal to it?
* How do I get my detail values to display?

Any help/direction you can offer is appriciated.
 
G

Guest

Hi Nancy,

You need to reset the forms record source to new query and requery the form:
Like:
Me.RecordSource = Qry
Me.Requery
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top