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

query by Form with access 2010 navigation form

53
Hello,
I have a form and subform . The Main form contains four boxes to enter criteria for the query that fills the subform. Outside of the navigation form it works great. when i add it to the navigation form on open the access paramter box pops up asking for criteria instead of just letting me enter it on the form. Is there a problem using this type of form in a navagation form.

SQL for Query:

SELECT Orders.[Employee ID], Orders.[Order Date], Orders.Received, Orders.Vendor, Orders.Quantity, Orders.[Ace Number], Orders.Description, Orders.Points, Orders.Price, [Quantity]*[Price] AS [Total Sales]
FROM Orders
WHERE (((Orders.[Employee ID])=[Forms]![OBE]![txtem]) AND ((Orders.[Order Date]) Between [Forms]![OBE]![txtstart] And [Forms]![OBE]![txtend]) AND ((Orders.Vendor)=[Forms]![OBE]![txtvendor])) OR (((Orders.[Order Date]) Between [Forms]![OBE]![txtstart] And [Forms]![OBE]![txtend]) AND ((Orders.Vendor)=[Forms]![OBE]![txtvendor]) AND (([Forms]![OBE]![txtem]) Is Null)) OR (((Orders.[Employee ID])=[Forms]![OBE]![txtem]) AND ((Orders.Vendor)=[Forms]![OBE]![txtvendor]) AND (([Forms]![OBE]![txtstart]) Is Null)) OR (((Orders.Vendor)=[Forms]![OBE]![txtvendor]) AND (([Forms]![OBE]![txtem]) Is Null) AND (([Forms]![OBE]![txtstart]) Is Null)) OR (((Orders.[Employee ID])=[Forms]![OBE]![txtem]) AND ((Orders.[Order Date]) Between [Forms]![OBE]![txtstart] And [Forms]![OBE]![txtend]) AND (([Forms]![OBE]![txtvendor]) Is Null)) OR (((Orders.[Order Date]) Between [Forms]![OBE]![txtstart] And [Forms]![OBE]![txtend]) AND (([Forms]![OBE]![txtem]) Is Null) AND (([Forms]![OBE]![txtvendor]) Is Null)) OR (((Orders.[Employee ID])=[Forms]![OBE]![txtem]) AND (([Forms]![OBE]![txtstart]) Is Null) AND (([Forms]![OBE]![txtvendor]) Is Null)) OR ((([Forms]![OBE]![txtem]) Is Null) AND (([Forms]![OBE]![txtstart]) Is Null) AND (([Forms]![OBE]![txtvendor]) Is Null))
ORDER BY Orders.[Employee ID], Orders.[Order Date] DESC;

Thanks
Jan 11 '11 #1
0 1982

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

Similar topics

5
by: will eichert | last post by:
Greetings. I have a problem with a combo box incorrectly displaying blank items when returning to a form from a modal form. It's fine when the main form first comes up, but gets messed up when the...
3
by: hi | last post by:
Hi, I've created a form, on the bottom it has the navigation buttons to move to the next/previous records. However, the button for "new record" is greyed out (i can't select it). How do I make...
2
by: Lenin Torres | last post by:
Hi everybody I have an Union Query that works fine. I used this query as the RecordSource for a Form. That Form is used as a subform in another form. Everything works fine, except for the "Filter...
2
by: ILCSP | last post by:
Hello again, I'm still in the process of changing ms access queries to Pass through queries. We're using a SQL Server 2000 database with an Access 2000 DB as our front end. I trying to convert...
0
by: abhishekjethwani | last post by:
How to write a query to access tree structure form multi table. I m having five tables from them first table give me a data which act as the parameter for query for the second table and the two...
1
by: phill86 | last post by:
Hi, I have an access 2010 database that I want to convert to an SQL Server database and I need to know if the data macros in access will still work in the SQL database or will i have to create...
5
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
6
by: VivDenham | last post by:
I have a Form, the fields of which I also use to copy and paste into a Report. However, each time I make design changes to the Form, I have to remember to copy and past the changes into the Report....
2
by: dougancil | last post by:
I have a user who had deleted some records from a database today using Access 2010. They have an ID field that's autonumbered. They have No Duplicates allowed. When they created a new record today,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.