473,804 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

somewhat advanced form query (need advice)

164 New Member
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 1439
jyoung2
32 New Member
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
1355
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 pricing and databases daily. As they all use different formats etc, I have linked all their data and import using append queries into a single table in a format of my choice. I then manipulate the data and use it to update my pricing according. I...
4
5140
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 Filter/Sort window: A window in which you can create a filter from scratch. You enter criteria expressions in the filter design grid to restrict the records in the open form or datasheet to a subset of records that meet the criteria.), you see the design...
4
1129
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 moment I have a dropdownlist that has the values 1-10 in it. What I want to happen is that when the user selects one of the values... lets say 3! Three parts of the form are repeated! This means that the three parts of the forms input id's have to...
43
2487
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 tick and fill in some of the spaces and when they hit seacrh i would like it to do is only show those colums that the has selected and if they don't select anything it shows a message saying "Please select a box"
5
2596
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 displays the results of a cross-tab query The cross-tab query is created dynamically (in code) as the column headings are subject to change. I therefore have to create a new form (in code) and add the necessary
6
5262
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 OpenQuery named Cust_lukup_Query using the text box(s) input data running in print view mode. The Cust_lukup_Query has the code setup to query the 3 fields using 1, 2 or 3 of the boxes or selecting all if there blank. What I need to do is add another...
0
1861
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 query creation area, I can right click and Save Query. I have saved a query fine. However, now if I go back later (after closing Access or the report) when I open it it back up (the report), I go back to Advanced...Advanced Filter/Sort.. right click...
6
9433
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 report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
0
2224
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 filter/query creation area, I can right click and Save Query. I have saved a query fine. However, now when I open the report back up (after closing Access or the report) and go back to Advanced...Advanced Filter/Sort.. right click and 'Load from...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10578
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...
0
10077
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
6853
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
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
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.