473,666 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Expression Builder - Access 2003

2 New Member
I have a 2003 Access Database with several tables related in a one to many relationship with a parent I am looking to build a report which evaluates if different users of the table have all entered data properly.

As an example - the parent table creates the customer account number, customer last name and customer ssn. A related table creates all other customer information including address, phone etc., another related table contains information researched on the customer

I am new to expressions but have determined if I wish to conpare two fields from 2 separate tables that should contain the same information, (however the field names are different), I think I would use the if-then-else expression below.

I have built a query with the parent and both tables and used the criteria line in the table A field 1 column to place the expression. I have also tried to move the expression to a new column which creates Expr1: - both have not returned the appropriate responses.

I have also tried building the expression into a control on the report itself separate from the query with no success.

IIf([tableA.field1]=[tableB.field2], "field match", "field input error")

(I am using the expression builder - not skilled in code yet) - any suggestions?
Nov 1 '06 #1
3 10363
MMcCarthy
14,534 Recognized Expert Moderator MVP
SELECT ParentTable.Fie ld1,
IIf([ParentTable.fie ld1]=[tableA.field2], "field match", "field input error") As TableAMatch, IIf([ParentTable.fie ld1]=[tableB.field2], "field match", "field input error") As TableBMatch
FROM ((ParentTable LEFT JOIN TableA
ON ParentTable.Fie ld1=TableA.Fiel d2)
LEFT JOIN TableB ON ParentTable.Fie ld1=TableB.Fiel d2)


Try something like this ....
Nov 1 '06 #2
rrosynek
2 New Member
SELECT ParentTable.Fie ld1,
IIf([ParentTable.fie ld1]=[tableA.field2], "field match", "field input error") As TableAMatch, IIf([ParentTable.fie ld1]=[tableB.field2], "field match", "field input error") As TableBMatch
FROM ((ParentTable LEFT JOIN TableA
ON ParentTable.Fie ld1=TableA.Fiel d2)
LEFT JOIN TableB ON ParentTable.Fie ld1=TableB.Fiel d2)


Try something like this ....
Thanks - where would I attach this statement - to a text box control in a report or to a new column in a query or to a criteria line in a column - trying to stay within boundaries of my knowledge of access expression builder feature/wizard

again - thanks
Nov 2 '06 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
Thanks - where would I attach this statement - to a text box control in a report or to a new column in a query or to a criteria line in a column - trying to stay within boundaries of my knowledge of access expression builder feature/wizard

again - thanks
I meant for you to use this as the Record Source for a new report which is what you said you wanted.
Nov 2 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3800
by: Grant Hammond | last post by:
I assume I'm not alone in my frustration that the expression builder that comes (in part) with Access XP that dosnt wrap text when you open it on an exisitng expression in a query or form. I's bad enough that Microsoft dropped the expression builder from the VB window (which I have restored using Michael Kaplan addin), but I cant understand how they could not have fixed this obviously and annoying BUG!@
0
1637
by: JMCN | last post by:
hi- this function IDSpecialCases works great in access 97 in the query builder but why doesn't it work in access 2003? would does anyone have any wild guesses? is it a problem with the dao reference? error message: undefined function 'IDSpecialCases' in expression. (Undefined function <name> in expression. (Error 3085) You entered an SQL expression that includes a Function procedure name that cannot be recognized. Make sure the...
1
2533
by: Laertes | last post by:
Hi, I want to use the expression builder in a query to define a field. I know how to do it for simple fields, like the one below : orderdate: IIf((IsNull() And =False) Or (<>"N/A" And =False),,) When though the expression is too complex, the builder is not very convenient to use. I tried to use a function instead... The error I
3
2037
by: X_HOBBES | last post by:
I'm fairly new to Access, let alone Expression Builder. However, it seems that I'm either doing something really wrong or Access is really stupid! I can't reference fields that show up on my report! For example, if I have a field named MyField on my report, the Control Source has the value MyField, and it displays the values of MyField properly in the report. If I try to use an expression as simple as =, it fails! I get "# Error"...
2
7357
by: Mike Turco | last post by:
I like using the expression builder for a lot of different things but it isn't always available when I want to use it, for example in the code window, or in all of the control properties. I am usually stuck having to go into the database window, creating a new query, etc., and then right-clicking in a field and selecting build. Is there a shortcut key, a way to add a button to an Access toolbar, or something like that so I can use to...
0
2472
by: AlexanderTodorovic | last post by:
Hello Everyone, I'm developing a client application in which the users need an expression builder as provided in MS Access 2003. I would like to use the expression builder in a C# application. Is is possible to call the expression builder e.g. via automation? If yes, how can i execute the rules and get the result?
14
16880
by: pdavis06 | last post by:
I know that there is a thread about this, but I was unable to add to it; I just joined. The problem is that I do not want to change the date format for the entire database output, merely for a header on a report and for a field on that report. I thought that I could just go into the expression builder and paste one of the codes that were posted in the thread about this conversion-you'll know that did not work. So, I went to the new...
18
4418
by: emajka21 | last post by:
Access 2000, I am trying to add a "Summed" total to a report (in a grouped footer section). But I only want to sum the top 3 items. I know how to write this in sql but it seems I can't get a to a sql expression box from the report view/text box. I can get to the text box properties but that only allows me to open up the expression builder. So is there a way to sum the top 3 in expression builder? Is there way to nest two different...
1
2246
by: KerryA | last post by:
Hi, I am trying to create a report on a table I have set up called ‘Outcomes’. I need to be able to do a count of all fields that have said ‘1’ ‘2’ or ‘3’ within a field name called ‘All outcomes’. I have tried using the expression builder but nothing seems to be working for me. Any ideas? Thanks in advance
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.