473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

WHERE-constraint in macro's to open a form

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
2 1350
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: diroddi | last post by:
I am having a problem using a dynamic where clause. I have a feeling that I am overlooking something very simple, although I can't seem to figure it out. The error i'm getting is: You have an...
2
by: Jorl Shefner | last post by:
Could anyone tell me the efficient way to do this? Extracting values from an array for a single condition (say all values greater than 'x') using 'where' and 'compress' is simple enough. >>>...
47
by: Andrey Tatarinov | last post by:
Hi. It would be great to be able to reverse usage/definition parts in haskell-way with "where" keyword. Since Python 3 would miss lambda, that would be extremly useful for creating readable...
3
by: KathyB | last post by:
Hi, I have 2 tables: tblStations StationID Station tblStationUser RecordID UserName Station I'm trying to come up with a dataset that contains the
0
by: Alex Vorobiev | last post by:
admittedly, this SP is probably a mess given that I am not a TSQL pro. its purpose is to, based on the arguments, do 1) paging or 2) return prev/next ids for a given record. it does the job, but...
3
by: A.V.C. | last post by:
Hello, I found members of this group very helpful for my last queries. Have one problem with CASE. I can use the column name alias in Order By Clause but unable to use it in WHERE CLAUSE. PLS...
4
by: Jacinle Young | last post by:
Hi all, I have written the SQL but it doesn't work db2 "select acode from t1 where (acode) not in (select eid from t2 where iid ='0') and iid ='0'" select nothing but the following works
3
by: Xiangliang Meng | last post by:
Hi, all. In 1998, I graduated from Computer Science Dept. in a university in China. Since then, I've been using C Language for almost 6 years. Although I'm using C++ in my current job, I'm also...
5
by: comp.lang.php | last post by:
if ($willLimitByDB) $sql = preg_replace('/#(+)#/i', '$$1', $sql); This does not give me the results I want, instead of the value of $where in $sql, I literally get '$where' instead. How do I...
9
by: Emin | last post by:
Dear Experts, I have a fairly simple query in which adding a where clause slows things down by at least a factor of 100. The following is the slow version of the query ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.