473,386 Members | 1,775 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,386 software developers and data experts.

In Access 2007, how to combine between with IIf

InkaYes
Hallo everybody, I need help pls.

In this project I've got query [q_Check_CHILDREN_NUM_vs_YIZKOR_2013] based on few tables:
1- with 73703 unique IDs [All_IDs2],
2- names of people that belongs to this ID's [t_FNs_RESULT],
3- status of these people [t_STATUS_RESULT], & so on.

Which in the end includes 7 specific IDs (rows) in which I intresteed.

For further examination, I need to see in front of me not only these IDs, but also one (or two) before & one (or two) after these IDs.

As I understood it, I should use between function... So I take & join the [All_IDs2] in one to many connection to the query [q_Check_CHILDREN_NUM_vs_YIZKOR_2013]. Suppose to be:

Expand|Select|Wrap|Line Numbers
  1. Between ([q_Check_CHILDREN_NUM_vs_YIZKOR_2013].[ID]-1)
  2. And ([q_Check_CHILDREN_NUM_vs_YIZKOR_2013].[ID]+1)
But it doesn't work, 'couse in the line before & after it's null (only 7 IDs).

So I need to combine it somehow with:

Expand|Select|Wrap|Line Numbers
  1. IIf([q_Check_CHILDREN_NUM_vs_YIZKOR_2013].[ID]= Null, [All_IDs2].[ID])
But it gives me a warning about mismatch in expression...
Someone please can give me another, better option, that works?

Actually I already made it by some heavy & really not elegant way, but I really want to know if there's some other way.
Jan 29 '14 #1
2 1034
NeoPa
32,556 Expert Mod 16PB
It sounds like you're hoping to get 7 different sets of data where each set is the identified record as well as the ones immediately before and after it.

Unless I read you wrong though, the ones before and after the selected ones are not, actually, numerically adjacent.

The code you (half) post seems to be working on the basis that they are adjacent. If so, then it is not just slightly wrong, but completely wrong in as much as neither it, nor even any derivative of it (Forget handling nulls as that's not even relevant.), could possibly work.

If I've understood you correctly then this is not a problem I can answer even. Sorry.

If I've misunderstood you then I suggest you make your question more clear. I say this in the full appreciation that you already appear to have put some effort into formulating the question in the first place. Well done for that.
Jan 30 '14 #2
Thank you NeoPa, you're not misunderstood me :)
Feb 1 '14 #3

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

Similar topics

0
by: umlv | last post by:
Hi, I understand that the runtime will be free with access 2007. I wonder about the following scenario: A user will have the full version of access 2003 installed (or an earlier version). A...
10
by: Bobby | last post by:
Hi, The organisation I work for is on the verge of buying Microsoft Office 2007 Pro Plus OLP NL. We currently use Office Pro 2003. Our business system is written in Access 2003 with a SQL Server...
10
by: Arno R | last post by:
Hi all, So I bought a new laptop 10 days ago to test my apps with Vista. (home premium) Apparently Office 2007 is pre-installed. (a time limited but complete test version, no SP1) So I take the...
3
by: dstork | last post by:
Has anyone else experienced Access 2007 crashing when users right click on the subform (with the intention to use the copy feature in the shortcut menu). I went through Allen Browne's...
2
by: sphinney | last post by:
Hi everyone. I have a form in my Access 2007 database with a Microsoft Office Document Imaging Viewer Control 12.0 object on it. The object is named "GRAPHIC_mdv". When the form opens I want to...
2
by: crazyhouse | last post by:
Hi, I dont even know where to start on this one. I found this on the net (everything in italics are the authors comments): Public Function OpenFirstAttachmentAsTempFile(ByRef rstCurrent As...
0
by: bkernan | last post by:
I upsized my Asset Template .accdb to SQL Server 2008. Every field except the Attachments works as expected. I tried changing the datatype of the Attachments field in the SQL Server table, no...
1
by: BethLe | last post by:
In Access 2007 how to prevent subform from adding each entry to table? Adds to the size of table. thanks!
2
by: Andy Briggs | last post by:
Hello all, I have a problem with distributing an Access 2007 application with the latest version of Access 2007 Runtime. What is happening that a date field on a form, whose default value is...
2
by: mcupito | last post by:
I am trying to make an annual report that brings together 3 subreports. Each of the subreports returns data in the manner and fashion I am seeking. The problem comes when trying to view them on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.