472,975 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

somewhat advanced form query (need advice)

164 100+
I think I have a rather advanced question that I was hoping to find some good help with. I am still pretty new to VBA and I know that doesn't help my situation here. But here is what I am trying to accomplish.

I have a relatively simple database. The main points are which I have a Form with a sub form in it. This form is a customer form and the main part of the form has their name address and phone number. The sub form has sales information. Date, Price, Product, Paid Amount, Balance, and status (status is open or paid)

So pretty simple..

What I want (Ideally) is to have a form I could open and it would query which customers have Open status. I can accomplish this much, as it is quite easy.. but I want to query it by date as well. So the form would come up and have a date input (not like the parameter query, which only lets you manually input date instead of using calendar) start date and end date. so it would query any Status of open from those dates. Then what I also couldn't even begin to figure out is: I want each result it brings back to have a check box next to it.. I want to be able to check which ever ones I desire then have a button that well send only the selected to a report template.


The only solutions I have come up with this far is to pop open a query with all open status and have the parameter query prompt me for dates. But the only downfall is I cannot select the ones I want to send to the report, it will only send all. I would love to have the check boxes but have no idea where to start.

I tried searching google to no avail before posting... may the Gods of access PLEASE help me out!

Thanks everyone in advance
Jan 22 '08 #1
1 1406
jyoung2
32
In regaurd to the Check box, You can't have an unbound checkbox in a continuous form. What I have done in the past is create a tempary table with a yes/no(bit) field in it. Change your query to an append query and append that table. You will need to change your subform so that it calls the temptable instead of the query
Then you can add the check mark field to the form. The Report would then be based on a query from the temp table where the checks(bit field) are true.

You will want to call the delete and make table from a button

Expand|Select|Wrap|Line Numbers
  1. docmd.setwarnings false
  2. docmd.openquery "YourDeleteTempTableQryHere"
  3. docmd.openquery "YourMakeTempTableQryHere"
  4. docmd.setwarnings true
  5. me.fsubyour sub Form.requery   'requry your subform so the new data shows.

For the Date you can place a start date and an end date on the form. In the query you can call the the date fields on the form.

Expand|Select|Wrap|Line Numbers
  1. between [Forms]![your Form Name]![DateStart] and [Forms]![your Form Name]![DateStop]
Jan 23 '08 #2

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

Similar topics

2
by: Michael Plant | last post by:
Hi all. I'm trying to write my first Access database and I'm getting on well. It's for my own small business use and the scenario is this. I have 4 or 5 suppliers who all email their product...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
4
by: Tim::.. | last post by:
I have asked this question several times and can't seem to get the answer I am looking for! I am trying to create a form that responds dynamically to the users choises within the page. At the...
43
by: Woodies_46 | last post by:
Hi all, I'm just a little bit stuck... what i have is a form with tick boxs and text boxs and stuff like that on it and a search button. What I would like to be able to do is for the user to...
5
by: superjacent | last post by:
Hope someone can help. I have a saved parent form containing an unbound sub-form. I set the SourceObject (form) after the Parent Form opens/loads. The sub-form (datasheet view) basically...
6
by: ljungers | last post by:
Hi to all and hope someone may have an answer for me. I have a Form named Cust_lukup_Form that has 3 text boxes and a click button that uses a OnClick to call Cust_lukup_Macro that runs an...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.