By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,983 Members | 2,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,983 IT Pros & Developers. It's quick & easy.

WHERE-constraint in macro's to open a form

P: n/a
Hi,

I've got this problem:

I made a form, named FORM_1. This form contains addresses in several
cities.

Than I've made a second form, FORM_2, and I've put a selection-list,
named "City", on it. On this form, there is also a button, which I'd
like to execute a macro. So I linked the button to MACRO_1.

MACRO_1: action: Open Form
Form: FORM_1
Image: form
WHERE: [City]=[Forms]![FORM_2]![City]
MODUS: only-read

When I execute the Macro, I got a little window where I can type the
name of a city, and then FORM_1 shows me the right record. But when I
open FORM_2 and choose a city in the selection-list, and I use the
button to execute MACRO_1, FORM_1 opens but there's no record showed.

What am I doing wrong?

Kind regards
Karl
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
km*****@hotmail.com (Karl) wrote in message news:<c5**************************@posting.google. com>...
Hi,

I've got this problem:

I made a form, named FORM_1. This form contains addresses in several
cities.

Than I've made a second form, FORM_2, and I've put a selection-list,
named "City", on it. On this form, there is also a button, which I'd
like to execute a macro. So I linked the button to MACRO_1.

MACRO_1: action: Open Form
Form: FORM_1
Image: form
WHERE: [City]=[Forms]![FORM_2]![City]
MODUS: only-read

When I execute the Macro, I got a little window where I can type the
name of a city, and then FORM_1 shows me the right record. But when I
open FORM_2 and choose a city in the selection-list, and I use the
button to execute MACRO_1, FORM_1 opens but there's no record showed.

What am I doing wrong?

Kind regards
Karl

Heeeeeelp :-)
Nov 13 '05 #2

P: n/a
Karl wrote:
km*****@hotmail.com (Karl) wrote in message news:<c5**************************@posting.google. com>...
Hi,

I've got this problem:

I made a form, named FORM_1. This form contains addresses in several
cities.

Than I've made a second form, FORM_2, and I've put a selection-list,
named "City", on it. On this form, there is also a button, which I'd
like to execute a macro. So I linked the button to MACRO_1.

MACRO_1: action: Open Form
Form: FORM_1
Image: form
WHERE: [City]=[Forms]![FORM_2]![City]
MODUS: only-read

When I execute the Macro, I got a little window where I can type the
name of a city, and then FORM_1 shows me the right record. But when I
open FORM_2 and choose a city in the selection-list, and I use the
button to execute MACRO_1, FORM_1 opens but there's no record showed.

What am I doing wrong?

Kind regards
Karl


Heeeeeelp :-)


Maybe in your macro the first action can display a messagebox of the
value in [Forms]![FORM_2]![City]. Maybe it is retrieving a value that
you don't expect.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.