Topics Search

Open form based on date field criteria

Open form based on date field criteria
Views: 32
I'm designing a database for my company and am attempting to create a calendar-like form for scheduling and whatnot. I want the user to be able to double click a specific calendar date and have a form pop up with all the items scheduled for that day.

However, I'm having trouble using a date as a criteria for the pop up form. This is what I have so far:
....
Unfortunately the form loads blank, because the date criteria doesn't pass anything.
Sponsored Links:

More topics

 

Opening one form based on 2 criteria in another form

Preview
I have a general form that contains patient information. In this form I can | scroll through different exam dates for a particular patient. I need to be |
able to open a second form (for editing) based on two criteria, patient ID | and exam visit date.

I have used open args before to open a form when only one criteria was being | passed, howeverm, I can't figure this one out.
 

Query criteria based on a form field

Preview
I am trying to open a report from a form using data from a field on the form as the criteria for the report query. I will try to explain.

I can get the report to open when the form field reads a single criteria like "Cross Country". My problem comes when I try to get the report to open when the field says Varsity Soccer or JV Soccer.

If I put *soccer* directly in the query criteria the report opens. If I put *soccer* in the form field and then get the query to read the criteria from the form, the report will not open.

I have also tried "Varsity soccer or JV soccer" in the field and it still does not work.

What other wording can I use to get all the Varsity soccer and JV soccer names to open in the report? Or what other approach should I use?
 

Filtering a Report

Preview
I will never again put ACCESS on my resume.serves me right for lying…

I am currently lost with what should be the easiest thing.

I have a report, based on a query, that is opened through an "open report" button on a form. This form also includes 2 filter criteria: "client" and "date" The appropriate criteria is setup on the query so that when I fill in these blanks, the report opens up nice and filtered.

However.

What if I ONLY want to filter by ONE of these criteria, e.g date, leaving the other one blank? And vice versa? or what If I want to leave both blank, and just open the report with no filters? Is there a way to do this?

I tried having two buttons to open two duplicate reports, one with and one without filters. This is most likely not the most efficient way, but it works. However, it only works with one filter. I need 2, possibly more.

One more thing. The DATE criteria is entered by specifying a start date and an end date. So if I want to look up the records for March, I'd select the first and the last day of march.Ideally, but not necessary, I would like to have 2 dropdown lists, one with the 12 months and one with a list of years, and filter it that way.
 

Sub Form Disappears When I add new field

Preview
1. I have a main form, single form, where you select criteria. Meal name, Meal ID, Start Date and End date.

2. You click the button Find Meals which only has the code me.refresh.

3. The sub form is based on a select query that reads the criteria off the main form and refreshes the sub form (continuous form) with the correct data. See Pic 1.

4. The select query is based on one table. See Pic 2.

I add one additional field from the table to the query. I then add the field to the sub form.

When I reopen the main form the sub form has disappeared from the screen. I select the same criteria in the parent form and click the button and nothing shows up. See Pic 3.
 

passing date criteria to query from control on form

Preview
I want to make a date criteria for my query. The query should return records from the same year as the date field on my form. This is probably a easy one for you guys.

The date field is short date in the table, with an input mask 00.00.0000;0;_.

I've tried the following in the query's criteria field:

Year([Forms]![FrmProject]![Date])

Anyone out there that can help me on my way
 

How To Open A Subform Based On A Criteria

Preview
Basics: I'm running a SQL server 2008 R2 back end with an Access 2007 Front end.

I need to find a way of opening up a main form and one of several possible sub forms depending on a criteria. A more literal way of putting it is
I'm trying to, based on an on click open up a form and also open up a sub form within that form based on state. We have a main table and several other tables that contain information based on state. The main form will be based on the main
table and holds our ID# and State. What I need to do is be able to open a states
table in the sub form based on what state is listed in our main table.

Is
there a query I can create that will do this using Joins between all the different state tables?
 

automatically having a field filled in based on another field's criteria

Preview
Within a table, I have a field named date and a field named qtr. On the form, I want to automatically fill in the qtr field based on the date field. for ex: if date=>01/01/2010 and date=04/01/2010 and date =
 

Query Criteria Question

Preview
I have a sub form in MS Access 2010 that is based on a couple of textboxes on the main form. One of those textboxes is for the user to enter a date value.

In the query I have a date field where the criteria is set for that text box. The issue is that sometimes the user doesn't know the date and leaves it blank. Instead of getting all dates for the person on the main form it returns nothing. I tried adding a column that referred to that textbox and set the criteria = Null and set that criteria in a different row then the date field so in SQL my query looks like

Select field1,field2,.
From MyTable
Where entereddate = forms!myform!dtvalue Or forms!myform!dtvalue Is null.

I have the main form and subform linked on the memberid but as soon as I add that to the query save and test MS Access crashes and exits.
 

Dsum criteria to return current month results based on date in another field

Preview
Sorry if I missed this in another post, bit didn't see it when searched for.

I have a form that has a [EntryDate] date/time field formatted as LongDate. This form also contains several currency formatted fields.

I am using DSum to calculate one of these currenct fields but am wanting to show only the results for the month and year that equals that of the currently viewed record based on the [EntryDate] field of the currently viewed record. Is this possible, and how would that criteria lo
 

Date Criteria from form to query!

Preview
I work on a form where I have four comboboxes for : Category , Product, Month , Year , 2 buttons for search and clear .
When I open the form there are all data displayed on a subform.When I choose criteria and hit search the subform filters out the results.
Now I have to add 2 more textboxes for Start Date and End Date.
I ve done this and have put the following expression to the criteria field in the query I am working with:
Between [Forms]![SearchForm]![StartDate] AND [Forms]![SearchForm]![EndDate]

So now I have the problem that I have to enter some dates on the two textboxes so that the subform displays some results else I get a blank subform .

Does anyone know how to display all data bypassing the criteria and if there are dates entered filter them by date?