Select All By Default For Query From Form.

May 11, 2006

Hey Folks,

I have a form with five combo boxes on it and one button, when each combo box has an option set and I hit the button, it runs a query which looks up the values of the form items and gives me my chosen information.

However, if these fields are: FirstName, Surname, State, Town and Road, and I want to only select on 4, 3, 2 or 1 of these - it gives me nothing.

So how do i specify that if the combo box is left blank just to select all.

So by putting data only into FirstName, say Eric, it will select ALL Surnames, states, towns and roads where the firstname is Eric.

View Replies


ADVERTISEMENT

Forms :: Select Record On Subform To Select Default Value In Combo Box?

May 6, 2014

I have a subform containing a list of Funds and attributes such as Asset Type, Fund Manager, etc.

Currently, I have a textbox, where the the control source is set so that it will be updated with the Asset Type from the subform.

I also have an unbound combo box that contains a list of Asset Types queried from a table via row source, where user can select the Asset Type.

What I would like is when a record is selected from the subform, the Asset Type is selected on the combo box as a default value. User can select another Asset Type if required. How can I do this?

View 1 Replies View Related

Select Default Record > Edit > Save

Nov 6, 2004

What I want to happen is ... in my order form


display a default record. ( a record of all products with suggested unit quantity
)
allow editing of quantity
then be able to save as a new record.

do I need a macro for this ?

any help welcome

thanks

View 1 Replies View Related

Setting Default Value On A Form From A Query?

Dec 9, 2014

I have a combo box field on a Student Details form that displays the Student's class number. For a new record, I am able to set the default value in the control's Default Value property with a literal in quotes (ie., ="2015-1"). But I want to set the default value from a query field. However, when I specify the query field in an expression ((=[Current Class]![Class Number]), "#Name?" appears in the field when initiating a new record on the form.

The control source for is the field in the Students table ([Students.[Class Number]).

The Row Source is a query of the Class table.

How can I set the control's default to the Class Number value in the Current Class query?

View 14 Replies View Related

Query To Return Default Set Of Values In A Subform When Main Form Opens

Apr 23, 2007

Here is my sample DBA

I'd like to solve this issue

when I open my Quotations form I'd like a set of services to be selected by default, ex: Brush and Pen. So the user only has to input the quote amount

is there anyway to have the form open with a script like:
"on open (or on load). in subform SELECT refproduct where product from tblproducts = 1 and also SELECT refproduct where product from tblproducts = 4"
Therefore when my main form opens, in the subform I have already Brush on the 1st line selected and pen on the 2nd. My user only has to type the price.

Thanks for your much appreciated help

View 2 Replies View Related

Select Form Record Set By More Than One Query

Mar 15, 2006

Hi,

I don't quite know if I am heading down a blind alley here. I want to filter a form to show a subset of the records via a toggle button. Click again and you go back to the full record set.

The form is based on a query and the filter is to be based on a copy of the query with several criteria and sorts added. This will result in a record set of active projects comprising about 20% of all records (65 out of 253). The sorting sets the record order to match the main management report and so the Planner can update the active records by navigating through the record set rather than having to search for each record using the Find button.

If what I am trying to do is not the way to achieve the desired result, I'd be grateful for any pointers elsewhere.

Regards,

Keith.

View 12 Replies View Related

Form To Select Fields For Query

Sep 14, 2006

I have written code to write a query with parameters set from selections made in a multiselect list box on a form.

I now want to add a check box for possible fields to include in the query and put these on the bottom of my form to allow users to select which fields they want to be displayed in the query result.

Can anyone advise how I can do this?

Many thanks,

Gary

View 1 Replies View Related

Editable Form With Select Query

Dec 17, 2013

I have a form with split view and data it taken from different table using join query, is there any way i can add edit form data and original table data gets changed.

View 2 Replies View Related

Select Multiple Criteria For Query On A Form

Oct 14, 2005

I was searching through here looking for a solution to the following problem:
I am building a Capacity database for work. The requirements require that users be able to sort by numerous criteria (Forecast Date, Portfolio, Market, Bucket, Month), all from a simple form that will spit out the results. Rather than creating unique queries for each combination of criteria(way too many!) or creating the SQL text in VBA, I played around until I came up with the following(which may have been done already, but I can't find it on here, so I'm not claiming to be brilliant...LOL). I have dropdowns on my form for each sort criteria-(Forecast Date, Portfolio, Market, Bucket, Month)

Then I created a query and for each criteria, I put this in:
Like (IIf(IsNull([Forms]![frmWAOFAdjustments]![Bucket]),"*",[Forms]![frmWAOFAdjustments]![Bucket]))

So if the user leaves a dropdown blank, the query simply brings back all the results from that field (Like *).

The text in bold is simply replaced with the dropdown name for each segmentation criteria. Next to each dropdown is a button that clears the dropdown box and requeries the listbox with the results(in case the user doesn't want to remove a criteria. This makes running searches for a specific number of accounts easy for the user and easy on me..lol.

Hopefully this can help someone out with a similar problem. I have learned so much from this forum, I just wanted to give something back. If anyone has any questions on this, just let me know.

View 2 Replies View Related

Cannot Get Query To Work With My Date Select Form

Jan 5, 2006

With the imense help of some of the people in this forum, I have scraped together a nice little database.
There is one function, however, which is not working.

I have a query that should run from a form I have created. The form has multiple criteria and all seem to be working except for the date fields... "First Order" and "Last Order".
The way I have it set up is that I have a table of dates. The form has a list box of the dates (first of the month, for 4 years).
The source data in the form reads: SELECT [TDateSelect].[StartDates] FROM TDateSelect ORDER BY [TDateSelect].[StartDates]; (for each of the 2 "minimum" dates)
and SELECT [TDateSelect].[EndDates] FROM TDateSelect ORDER BY [TDateSelect].[EndDates]; (for each of the 2 "max" dates)
The user is allowed to select a date range for the first order and the last order. (4 dates altogether).

The form looks fine.

In the query, I have set the criteria for the last date as:
Between [Forms]![FSetOtherCriteria].[MinLast] And [Forms]![FSetOtherCriteria].[MaxLast]

When I run the query (even with a wide date range) I get no results. When I remove the dates from the query, or enter the limits manually, the query works like a dream.

Any ideas???

View 3 Replies View Related

Select All Query Fields For Main Form?

Sep 13, 2013

I have a table with about 3800 records and about 150 fields. It also has 4 tables with related data that each have only one field. I am going to create a query to base my from from. Should I just take the star * and get all the fields for each table or should i manually specify them. There are only about 5 fields out of the 150 that I dont need and I need to see the rest.

View 13 Replies View Related

Query For Populating A Form Based On Different Select Criteria

Feb 20, 2006

Hi all,
I have a query which populates a form called EditPatientFrm, which asks the user to enter the patient UniqueID in order to pull up the record they want to edit from the TblPatient. However, I want the user to now be able to input just one of three criteria in order to pull up the record to be edited:

UniqueID
ChartNumber
PatientLastName and PatientFirstName (two fields)

since they may not have the UniqueID readily available to them.

Can anyone show me how to do this? I have tried to find answer to this one under queries and forms- no avail. Sure it's a simple thing...

thanks!
vrpres

View 1 Replies View Related

Select Record In Split Form Query Result

Mar 25, 2008

I have searched and search and I can't find the answer to this question when I thought it would be simple. Hopefully you can put me out of my misery!

I have a access 2007 split form with a series of search boxes and a query result window. Enter info into one or more of the search boxes, click search and you get the matching results in the query window below. That works fine but I want to work with the results of the query, how can I do this?

I was looking for the user to be able to select a record and then click a command button to open that record in a form. Or in another instance select a record in the result window, have the current from close and have the primary key passed to a another form which I use to open the split form.

I just can't see how to do it but I expect there are several ways. Happy to use VBA but my experience is with Excel VBA so I'm still getting used to the objects.

Thanks in advance!

View 4 Replies View Related

Running A Query Based On A Select Record In The Form

Jun 13, 2006

Hi,

I have a query that I would like to run from a form. I have created the button and the query, but want to add in a clause that will use the user selected record / field as the criteria for the query when its run.

Got any examples of code I could have a play with

I am struggling here so need any help I can get!!

Cheers
Paul

View 1 Replies View Related

Queries :: Form To Select Which Fields Show In Query

Oct 8, 2013

I want to create form with 10 checkbox, each checkbox is linked to a field "name, Address, TelephoneNumber, BuissinessName" I would like to know if it is possible for the user to check the box and then the field will show in query. if only name is check then only name will show in the query.

I have tried using [Forms]![Formname]![CheckboxName] as criteria but this didn't work it when I had more then one checkbox and when the one check box was not checked nothing showed in the forms.

View 5 Replies View Related

Queries :: Combo Box On Form That Passes Criteria To Simple Select Query

Sep 22, 2014

I have a combo box on my form that passes criteria to a simple select query. There are four possible selections to make from the combo box. For some reason, when I select the first option on the list the query runs perfectly. However, if I select the second, third or fourth option from the combo box, the query returns no records, even though I know there are records in my table which should be returned.

View 5 Replies View Related

Queries :: Form To Select Parameter - Causing New Field In Query Design

Jun 16, 2015

I have a query with multiple fields that is being run off of 3 parameters (linked for selection in a form). The problem is, I wanted to enable a select all feature, so I included a "Or ... Is Null" part in my criteria section, so that when nothing is selected, the query/report returns all records.

Okay so the problem is whenever I run the query with nothing selected for the parameter and then return to design view for the query, a new field has been created in the query design, titled with the expression I use to pull the parameter value from the form. This is frustrating because then that is causing errors in another report I run that pulls values from that query.

View 1 Replies View Related

Queries :: Select Query To Gather Results Of Other Select Queries

May 11, 2014

I'm fairly new to Access. 's various select queries containing useful and useless results. I want to create a select query that will pick out all the useful figures into a 1 row table that can then be pasted into Excel.

e.g Existing Select Query 1 returns 1 row showing Average Age, Average Price, Total rainfall
Existing Select Query 2 returns 1 row showing Average Weight, Average Salary, Total snowfall
Existing Select Query 3 returns *2* rows: It returns Distance from London, Hours daylight and population for Town A and Town B

I want a select query that returns 1 row showing (6 items):

Total rainfall, Total snowfall, Town A Distance from London, Town A Population, Town B Distance from London, Town B Population.

I've been able to handle getting Total rainfall and Total snowfall. But I cant figure out how to get Town A Distance from London, Town A Population, Town B Distance from London, Town B Population to appear in the same row of the same query results as Total rainfall, Total snowfall.

View 3 Replies View Related

Default Combo Box Based On Default Table Value

Feb 13, 2006

Hi Everyone,

I hope someone can help.

I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).

Currently in order to set the default value, I have used the following code for each default;

Private Sub Form_Load()
Forms!frmMediaLabeller!CboDriveName.DefaultValue = """D"""

End Sub

However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D: Drive. I have tried to replace the D above with an SQL statement but with no success.

Private Sub Form_Load()

Dim Drivename As String

Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));

Forms!frmMediaLabeller!CboDriveName.DefaultValue = """Drivename"""

End Sub

This is definetly not working, can anybody help, I have a feeling it is syntax but not sure where? :confused:

Robert88

View 7 Replies View Related

Default From Another Form

Mar 17, 2007

I have a table with a field [drivers name] that I want to default to another field in a form in the same db, is this possible???

View 7 Replies View Related

How To Startup My Form Only Without Access's Default Form

Apr 19, 2006

I am trying to display only my form on startup.
Tools-Startup allows you to eliminate"Database window" default menu and toolbar but I can't eliminate "Microsoft Access" window.

I don't know if there are other settings that I am not aware of or there has to be code built.

Thanks in advance
Sebastian

View 8 Replies View Related

Default Value On Filter By Form

Apr 7, 2008

I setup a button in order to start the filter by form action. Is there a way to enter values into the fields using VB after the filter by form action has been executed. I would like a default value be placed in a certain field every time filter by form is executed. Thanks in advance.

View 8 Replies View Related

Form Default Question.

Jul 15, 2005

I have a form that has a textbox for a search of my database (in the header), and then in the detail section there are fields for the data to be shown in. Right now, one of the data entries comes up as a default when I open the form, and I cannot find a reason for it. Is there a way to change this? I've tried setting defaults for the fields, but those are only shown if I do a search and nothing matches. Thanks for any help.

Robin

View 1 Replies View Related

Default Value For A Field In A Form

Jul 26, 2005

We have a database form that we use to create "SDN" forms for our engineering department. We want it to autogenerate a number for us for each form. We want this field to be 5600 + the record number. How do I do this?

Thanks for the help.

View 1 Replies View Related

Default Value For A Field In A Form

Jul 26, 2005

We have a database form that we use to create "SDN" forms for our engineering department. We want it to autogenerate a number for us for each form. We want this field to be 5600 + the record number. How do I do this?

Thanks for the help.

View 1 Replies View Related

Setting Default Value Within Form

Jul 25, 2006

Hi, im new to the forums - this is my first post.

On a form i have a text box which holds the date that a file batch was taken to be processed. Each file holds the date of when the batch it originated from was taken. At the moment for ease of use the 'Default Value' of the text box is set to the batch's date.

I want to set it up so i can change the default value of the cell, so that when a new batch is to be processed the new date becomes the default value.

I am invisaging a button which brings up another form with a text box into which the new date can be put. when the form is saved and closed, the date recieved cell on the master form assumes the new default value.

gawd... methinks that was an awful explanation.

please help!

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved