A list box does not NECESSARY have one value, use a combo box, or collect
the selected items as illustrated in
http://www.mvps.org/access/forms/frm0007.htm.
Again, with DoCmd, it is totally useless and even error prone to error
(due
to the required delimiters) to move the FORMS!FormName!ControlName
outside
the string of the criteria.
Hoping it may help,
Vanderghast, Access MVP
Hey,
for the two question i just posted this is what i've tried.
this on i just want it to populate the field on the MSM form
1. DoCmd.OpenForm "MSM", , , _
"[qrUnmatch.ID_1]=" & "'" & Me.MyList.Column(0) & "'"
this one i like to print out A report for each ID_1 that's selected
from
the
list.
2.Private Sub PrintMultRpt_Click()
DoCmd.OpenReport "rptProduction", acViewPreview, ,
"[qrProduction.ID_1]="
& "'" & Me.MyList.Column(0) & "'"
End Sub
and none are working.
--
need help
:
DoCmd.OpenForm "frmMain", whereCondition :=
"ID_1=FORMS!frmMultProduction![qrUnmatchProd.ID_1]"
should do. You can skip the arguments, and the coma, if you supply the
argument name, followed by := followed by the value of the
argument.
Since you use DoCmd, you can keep the FORMS!formName!ControlName
inside
the
'string', which has the benefit to NOT have TO supply delimiters in
case
of
string, or date, since you refer to the holder of the value, not the
constant itself.
I ASSUMED the control name was [qrUnmatchProd.ID_1]. Indeed, your
original
message is with an excess of one ! There is one between the keyword
FORMS
and the form name, and another one between the form name and the
control
name. If you wish to refer to a sub-form control, the syntax is
lightly
different.
Hoping it may help,
Vanderghast, Access MVP
got it...thanks a lot...can you help with this?
i have a form with a subform in it in a datasheet format. on a click
event
of one of the fields, i like to open another form and i like to pass
the
object that i just clicked on to that form pertaining field. can
this
be
posible.
something like this.
DoCmd.OpenForm frmMain, , , "[ID_1]='" &
Forms!frmMultProduction!qrUnmatchProd![ID_1] & " "
but its not doing it
--
need help
:
You can create a table and define an index, on one of its field,
not
allowing duplicated values into it.
Hoping it may help,
Vanderghast, Access MVP
I am not sure is this is possible since i am fairly new to this. I
have
a
linked table to an xl table and i was to do couple of things with
it.
--One is that i have another table that i compare it to and get
the
unmatch
records...it's there a way to do this without going through the
whole
process
of creating the unmatch query to update the current table. the xl
table
needs
to me compared at all times because it might have new records
that
come
from
a different program.