Re: HELP WITH UPDATE QUERY
- From: "Michel Walsh" <vanderghast@VirusAreFunnierThanSpam>
- Date: Thu, 22 Mar 2007 07:18:27 -0400
1- To specify the rowsource of a list box, or combo box, it must be a
complete SQL statement:
Me.ComboBoxName.RowSource = "SELECT * FROM myTableName WHERE
myFieldName=FORMS!FormName!ControlName "
2- Have the list box multiple selection (Multi Select property) turned on,
to something else than none (ie, simple,or complex).
Then, you can use http://www.mvps.org/access/forms/frm0007.htm to reach
each selected items in the list, and, in the example, make an SQL statement
that limit the records to those there the field has a value among those in
the selected line in the list box.
Hoping it may help,
Vanderghast, Access MVP
"Will G" <bigwillno2@xxxxxxxxx> wrote in message
news:0B7BEC67-1037-4681-B9CE-5BC34A955336@xxxxxxxxxxxxxxxx
Hey that works just fine...thanks a bunch....
1. now when you want to select an item from the list box, does the same
rule
apply....for example,
DoCmd.OpenForm "frmMain", whereCondition :=
"ID_1=FORMS!frmMultProduction!mylistbox"
or is it different systax
2. i know i am asking too much now, but i think you doing a great job
helping me and thanks...i have another question. i have a differetn LIST
BOX.....theList, the user wants to select MULTIPLE items from this list
and
click a cmdbutton that printspreview of reports. the list box comes from a
query named qrProd and the list box is from that same query, there is a
rpt
that's also from that query. how can i have the user select multiple items
from this list and preview different report for each item. i dont know if
explained myself well, but that's the idea.
--
need help
"Michel Walsh" wrote:
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
"Will G" <bigwillno2@xxxxxxxxx> wrote in message
news:9A12E6B0-AD13-4BB2-8EA2-FAD493EA9586@xxxxxxxxxxxxxxxx
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
"Michel Walsh" wrote:
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
"Will G" <bigwillno2@xxxxxxxxx> wrote in message
news:3C376925-D92B-41FC-8C51-8B46F701A542@xxxxxxxxxxxxxxxx
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.
--
--
need help
.
- References:
- Re: HELP WITH UPDATE QUERY
- From: Michel Walsh
- Re: HELP WITH UPDATE QUERY
- From: Michel Walsh
- Re: HELP WITH UPDATE QUERY
- From: Will G
- Re: HELP WITH UPDATE QUERY
- Prev by Date: Re: Questions on format of Select statement
- Next by Date: Re: HELP WITH UPDATE QUERY
- Previous by thread: Re: HELP WITH UPDATE QUERY
- Next by thread: Re: HELP WITH UPDATE QUERY
- Index(es):
Relevant Pages
|