Part One: I have no idea how to do this!

M

Mala

Hi all,

I don't know if this can be done, but here goes:

I have a form (a modal pop-up) with a drop-down list that
contains three columns: ID, last name, first name.

When I click on the name of the person from this list, I
want it to open a second form with the ID, last name, and
first name already populated at the top of this form and
information about this person (stored in a different table
than where the name info is stored...but connected by ID)
in a subform of the second form.

Form A
(drop-down)
1 Smith Fred

Form B

ID: 1
Name: Fred Smith

(subform)
[ID] Date Venue
[1] 10/16 ABC Place

[ID] column is hidden.

I have the drop-down on the pop-up connected to a macro
that invokes "OpenForm", which works, but I have no idea
how to pass the data to the form.

Any suggestions?

I have another issue (related to this form) in "Part Two"
just so this doesn't get too long.

Thanks for your help in advance!

Take care,

Mala
 
D

Dan Artuso

Hi,
Take a look at the 'where condition' argument of the OpenForm action.
You would want to use the ID field as criteria.
In code it would look something like this:

DoCmd.OpenForm "formName",,,"[ID] = " & Me.yourCombo
assuming ID is your bound column in the combo, if it's not,
use the column property:
& Me.yourCombo.Column(2)
where the first column is 0, the second is 1 and so on.

I've never used macros, so I can't help you out there!
 
K

Ken Snell

Dan's suggestion can be done via macro....there is a Where argument in the
OpenForm action in the macro design view into which you can type the
expression that Dan provides:
="[ID] = " & [NameofComboBox]

--
Ken Snell
<MS ACCESS MVP>

Dan Artuso said:
Hi,
Take a look at the 'where condition' argument of the OpenForm action.
You would want to use the ID field as criteria.
In code it would look something like this:

DoCmd.OpenForm "formName",,,"[ID] = " & Me.yourCombo
assuming ID is your bound column in the combo, if it's not,
use the column property:
& Me.yourCombo.Column(2)
where the first column is 0, the second is 1 and so on.

I've never used macros, so I can't help you out there!

--
HTH
Dan Artuso, Access MVP


Hi all,

I don't know if this can be done, but here goes:

I have a form (a modal pop-up) with a drop-down list that
contains three columns: ID, last name, first name.

When I click on the name of the person from this list, I
want it to open a second form with the ID, last name, and
first name already populated at the top of this form and
information about this person (stored in a different table
than where the name info is stored...but connected by ID)
in a subform of the second form.

Form A
(drop-down)
1 Smith Fred

Form B

ID: 1
Name: Fred Smith

(subform)
[ID] Date Venue
[1] 10/16 ABC Place

[ID] column is hidden.

I have the drop-down on the pop-up connected to a macro
that invokes "OpenForm", which works, but I have no idea
how to pass the data to the form.

Any suggestions?

I have another issue (related to this form) in "Part Two"
just so this doesn't get too long.

Thanks for your help in advance!

Take care,

Mala
 
D

Dan Artuso

Thanks for jumping in Ken!

--
HTH
Dan Artuso, Access MVP


Ken Snell said:
Dan's suggestion can be done via macro....there is a Where argument in the
OpenForm action in the macro design view into which you can type the
expression that Dan provides:
="[ID] = " & [NameofComboBox]

--
Ken Snell
<MS ACCESS MVP>

Dan Artuso said:
Hi,
Take a look at the 'where condition' argument of the OpenForm action.
You would want to use the ID field as criteria.
In code it would look something like this:

DoCmd.OpenForm "formName",,,"[ID] = " & Me.yourCombo
assuming ID is your bound column in the combo, if it's not,
use the column property:
& Me.yourCombo.Column(2)
where the first column is 0, the second is 1 and so on.

I've never used macros, so I can't help you out there!

--
HTH
Dan Artuso, Access MVP


Hi all,

I don't know if this can be done, but here goes:

I have a form (a modal pop-up) with a drop-down list that
contains three columns: ID, last name, first name.

When I click on the name of the person from this list, I
want it to open a second form with the ID, last name, and
first name already populated at the top of this form and
information about this person (stored in a different table
than where the name info is stored...but connected by ID)
in a subform of the second form.

Form A
(drop-down)
1 Smith Fred

Form B

ID: 1
Name: Fred Smith

(subform)
[ID] Date Venue
[1] 10/16 ABC Place

[ID] column is hidden.

I have the drop-down on the pop-up connected to a macro
that invokes "OpenForm", which works, but I have no idea
how to pass the data to the form.

Any suggestions?

I have another issue (related to this form) in "Part Two"
just so this doesn't get too long.

Thanks for your help in advance!

Take care,

Mala
 

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

Top