N
Nancy
Hi -
I have a form:
My heading contains 1 list box field called ASSY1. It is unbound and gets
it's data from the PSF_TABLE.
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()
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, IM_TABLE "
cSQL = cSQL & "WHERE PSF_TABLE = '" & Me!assy1 & "'"
cSQL = cSQL & " AND PSF_TABLE.PART = IM_TABLE.PART "
cSQL = cSQL & "ORDER BY PSF_TABLE.PART"
End If
Me.AllowAdditions = False
Me.RecordSource = cSQL
Debug.Print cSQL
End Sub
When I enter the form I am asked to enter a parameter value for
im_table.VDESC, im_table.UM, Me!Assy, im_table.PART. Using the drop down, I
select a value into ASSY1 and am asked to enter a parameter for PSF_TABLE.
Nothing happens and I do not get any fields. Also the debugger does not come
up (not sure how to turn it on).
So now I am a bit lost.
* Am I using the correct method to produce a query screen where the user
would enter a value in a unbound field and display those items which are
equal to it?
* Why am I being requested to enter values in the beginning of the form?
Any help/direction you can offer is appriciated.
I have a form:
My heading contains 1 list box field called ASSY1. It is unbound and gets
it's data from the PSF_TABLE.
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()
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, IM_TABLE "
cSQL = cSQL & "WHERE PSF_TABLE = '" & Me!assy1 & "'"
cSQL = cSQL & " AND PSF_TABLE.PART = IM_TABLE.PART "
cSQL = cSQL & "ORDER BY PSF_TABLE.PART"
End If
Me.AllowAdditions = False
Me.RecordSource = cSQL
Debug.Print cSQL
End Sub
When I enter the form I am asked to enter a parameter value for
im_table.VDESC, im_table.UM, Me!Assy, im_table.PART. Using the drop down, I
select a value into ASSY1 and am asked to enter a parameter for PSF_TABLE.
Nothing happens and I do not get any fields. Also the debugger does not come
up (not sure how to turn it on).
So now I am a bit lost.
* Am I using the correct method to produce a query screen where the user
would enter a value in a unbound field and display those items which are
equal to it?
* Why am I being requested to enter values in the beginning of the form?
Any help/direction you can offer is appriciated.