Query Linked To Combo Box... Select All?

Sep 1, 2005

Hiya,
I currently have a query that looks up staff names and then if they click a staff name from the combo box on a form they are then able to preview a report showing their performance. I want the combo box to have the ability to be left blank or the option to select all so that I can preview all their performance in the report.

How do i go about doing this?

Andy

View Replies


ADVERTISEMENT

Select Query Using A Value In One Or 2 Combo Boxes

Mar 14, 2007

Hi,

I currently have a select query that has a where statement to select a value depending on the value of a combo box in a form.


WHERE (((tblSampleSubmission.SubmissionNumber)=[Forms]![frmReportPreview]![SubNumber]))


What I am wondering is there any way that the where statement can be for another form depending on what form is currently active by using an "or" statement?

Basically what I am trying to do is make the db as easy to use as possible and not have to type in the value again.

View 2 Replies View Related

Updating One Combo Box From Another Using Select Query

Mar 27, 2007

I am trying to make a combo box that is controlled by the value in a previous combo box. The first combo box lists genres for games (e.g. RPG, Sports, Action) and the second, when necessary, will expand on this. For example, if Sports is selected in the first, the second would display a list of sports (Football, Hockey etc.).

The following items from my database are relevant to this question:

tblGames
GameGenre
GameSubGenre
tblGenres
Genre
tblSubgenres
Subgenre
SubgenreGenre
qrySubgenres

tblGames uses a lookup wizard to assign the tblGenres list to the GameSubGenre field. Also, tblSubgenres uses a lookup wizard to get the value for SubGenreGenre from tblGenres.

I built the following select query using the expression builder:

SELECT tblSubgenres.Subgenre, tblSubgenres.SubgenreGenre
FROM tblSubgenres
WHERE (([SubgenreGenre]=Games!GameGenre));

When I run the query, it asks me to enter a value for Games!GameGenre. If I enter a correct value, it lists just the sub-items I want. However, if I set GameSubGenre in tblGames as a combo box that looks up from qrySubgenres, the combo box will remain blank always.

What should I do to get this working properly?

Thanks in advance for any assistance!

View 6 Replies View Related

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

Forms :: Query Show A Combo Box To Select What Is Connected To Data

Dec 10, 2013

I'm trying to set a query with 6 fields.

My question is: Is it possible that the query shows me a combo box to select what is connected to this data.

Example fields:

HospCode; HospName; Dept; ModName; SerialN; DatInst

I'm looking to select name of a hospital from "HospName" from a list box. If no, then at least to write the name and the rest I'll get it associated with the name.

Then I need to know if I can put this in a form so the form asks same criteria?

View 1 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

Display Records Of Select Query After Selecting Desired Data From Single Combo Box

Nov 13, 2011

I created a subform that displays the records of a select query after selecting the desired data from a single combo box (for instructors name) and then using an OpenQuery macro attached to a button.

Only 1 record is displayed in the subform each time I hit the button. If I look at the query return there is no change. However, if I close the query and select a new instructors name, although I only get one record in the subform, the query when opened shows all the correct records.

What is wrong with my macro/subform?

View 8 Replies View Related

Combo Box Based On Linked Table Needs To Pull Info For Sub-Form From Non Linked Table

Aug 31, 2007

I am trying to build a Form that will show an estimate (then eventually will be moved to a project if customer and employee aggree to price and project) in a Form F_Estimates is a M_Customers(Customer_ID) (Based on a Table) and thier info in a Subform. Also is the "projected costs" from parts out of the Parts(Part_ID) (Based on another Table) in a second Subform as a list that I need to calculate $$$ in
(Dang that still sounds evil and definately NOT understandable even after edit... so)

Here's some basic info

Tables

EstimatesandParts - Table
EstimatesandParts_ID : Autonumber
Estimate_ID : Number
Part_ID : Number

Parts - Table
Part_ID : Autonumber
PartNumber : Text (not a number due to some part#s have letters in them)
PartName : Text
Unit Price : Currency
Description : Text

Estimates - Table
Estimate_ID : Autonumber
InvoiceNumber : Text (again can have letters in it)
EstimateDate : Date/Time
EstimateTime : Date/Time
Employee_ID : Number
Customer_ID : Number
ProblemDescription : Memo

Customers - Table
Customer_ID : Autonumber
FirstName : Text
LastName : Text
CompanyName : Text
Address : Text
City : Text
Province_State : Text
Postal_ZIPCode : Text (CDN Postal codes are letter num letter...)

you can see the link table in the EstimatesandParts Table

Now I want to use that link to populate a subform in the F_Estimates form

Forms

SF_Customers - SubForm

(all boxes atm are text boxes on this form till I figure out the Parts section then will use same base for this so I can pick any customer in the database to be the customer for this estimate. Also will have ctrl button for making new customer with customer form and a refresh on Focus Gain bit of code)

FirstName
LastName
CompanyName
Address
City
Province_State
Postal_ZIPCode

SF_Parts - SubForm
Default View -Continuous Forms

(want it to be a list of parts that I can grab prices and descriptions from then in a bit of code to calculate a cost of parts)

Part_ID : Combo Box
Control Source - Part_ID
Row Source Type - Table/Query
Row Source - SELECT Parts.Part_ID, Parts.PartNumber, Parts.PartName, Parts.UnitPrice, Parts.Description FROM Parts ORDER BY Parts.Description;

(Pulls info from the table Parts for input into a list of parts to be used on that project)

PartName : Text Box
UnitPrice : Text Box

(here's where I run into problems due to the fact that the form is not based on the parts table but rather the link table EstimatesandParts so I can't propogate the info to the 2 other text boxes, ps I dont care if they cant be text boxes and have to be linked or some other type I'm not "set" just need to find out how to make it work )

(have tried a couple things to complete this task)

Me.txtPartName = Me.Part_ID.Column(2)
Me.txtUnitPrice = Me.Part_ID.Column(3)

(works AWSOME ... for ONE ROW then propogates the second selection to the first and second and third selection to first second and third and so on ...)

(tried to make control source for the txtPartName to)

=Forms!Parts!Partname

(Doesnt exist .. akkk, cant use ActiveForm either as it doesn't focus on the SubForm but the MainForm ... cry)

F_Estimates - Form

Estimate_ID
InvioceNumber
EstimateDate
EstimateTime
ProblemDescription

(all basic Text Boxes)

Employee_ID
Customer_ID

(Combo Boxes Select Customer and Employee from list of present ones of each)

SF_Customers
SF_Parts

(Both SubForms on the main form)

Now this is an Exerp from my entire Database I like to work on one small problem at a time and I have made this its own little database till I figure out the problem then I will bring the info I learn back into the rest of the database and go from there ...

Hope you can help I have a feeling I will need to make a recordset and go from there but I'm just not able to wrap my head around that for some reason

Thanks in advance for ANY and ALL help that I get from here

View 10 Replies View Related

Forms :: How To Filter Combo 2 From Table After Select Value From Combo 1

Nov 5, 2013

i have a table with three column Named

1-State
2-City
3-Customer

on a form i m placing 3 combo box for each column how can i filter combo 2 from table after select value from combo 1

View 1 Replies View Related

Combo Box Linked To Pk

Feb 26, 2006

I have a main form with a subform linked by id. In the subform I have a combo box with list of agents in it from a table.

I would like to know how to get the combo to only show agents only linked to the group id on the main form.

help would be much appreciated
regards

View 1 Replies View Related

Won't Update: Subform Linked By Combo

Apr 6, 2005

I have a form that I have linked (master/child) to a combo box on my main form. I have a requery command for the subform set to the "After Update" event on the combo box. When the combo box is updated originally, the subform updates. However, if the combo box is updated after having a value, the subform does not update.

First off, is the requery command even the right command to use to update the subform? (it's source object is a table) Second, is there a reason it wouldn't work if that is the correct command?

Any ideas?

View 2 Replies View Related

Option Button Linked With Combo Box

Jun 28, 2006

Morning folks,

Todays problem is as follows!...

Is there away to set the values in a combo box depending on what option button you have selected.

What I would like is to select an option button in an option group then that would trigger certain vaules in a combo box. And if I selected another option button it would change the values in the same combo box?

So if I selected optWhite, the values in cboEthnic = British AND Irish AND Other

If I select optMixed, the values in cboEthnic = White and Black Asian AND White and Black Caribbean etc...

Hope this makes sense.

View 1 Replies View Related

Rats! - "select...into" Replaced Linked Table

Oct 10, 2007

Hello folks,

I am looking over a mdb that I recently took over and found a problem.

There is a query that does a "select...into" a table, which obviously replaces the original table with the new records from the select statement.

Ok, but... The table is supposed to remain a linked table. The query currently replaces the linked table with a local table viewable only by the locally running mdb.

QUESTION: Is there a way to set up a select into statement to replace a linked table with another linked table?

I found:

dim mydb as database
set mydb=currentdb
mydb.execute ("INSERT INTO Table1( [Field1], Field2, [Field3] )
SELECT [Field1], Field2, [Field3] FROM Tablename IN 'c:foldernamedatabasename.mdb")

Which could do the trick, but I would prefer not to hardcode the path to the network data.mdb. Maybe I could query the path of the table and use that into the above... Ideas? Just now thought of that...

I figured I would ask before I rewrote the query to merely update with new records and then delete old... or delete all then update/insert with all new...

Ideas?

Thanks!

View 2 Replies View Related

Reports :: Select Most Recent Record From A Table That Is Linked To Another Table

Jul 13, 2014

I have a basic database design, well I think so anyway. It only has two tables:

1. tblClientInfo
2. tblNotes

Basically each client has multiple notes/comments that can be linked to its record, hence the tblNotes table. The two tables have a one-to-many relationship, being that each customer can have many notes.

I then have two forms:

1. Claims Loss Form
2. tblNotes_DatasheetSub1

So I can enter multiple notes for each customer. The problem I am having is with the report output. It wants to print every note (record) that is linked to the customer. I just need it to print the most recent note for each customer (It would save a lot of wasted paper).

Example of a print out of what it is doing:

John Doe - 123 Easy St - Notes 1 (Most Recent Note)
John Doe - 123 Easy St - Notes 2 (Previous Note)
John Doe - 123 Easy St - Notes 3 (and so on...)

It is printing duplicates of the same customer by adding the additional notes for that same customer on a new line.

How can I tell it to only print the customer one time in the report, and most importantly, to only use the most recent note that is linked to the customer?

I tried using DMax("NoteDate","tblNotes"), but this only returns one customer with one note. I need it to do that for each and all customers.

I have successfully ran a subquery (two queries with one linked to another) by following detailed instructions from this page I found: [URL] .... It works, but the problem is it only shows the latest date for each note, not the actual contents of the note. I feel so close with this option, but so far at the same time.

The TOP n records per group looks promising that I found here: [URL] ...., but I honestly don't know how to implement it correctly in my SQL. I am very much still learning Access and apparently have stumbled into something that is much more complicated than I had originally imagined. I just assumed I could filter the duplicates out, or tell access to print the last or most recent note record for each customer.

View 2 Replies View Related

Combo Box Select

May 2, 2006

I have a form that uses a drop down to populate another drop down (field#2). The information in field(#2) is pulled from a table where the condition in the first drop down is matched. In effect the form drills down and offers specific choices based on the original condition.

The form works correctly when first opened. If the selection in the first drop down changes the associated information in the other field does not update to reflect the new value to match. The form has to be closed and re-opened before it works properly.

Any ideas?

View 4 Replies View Related

Combo Box Won't Select

Sep 5, 2006

I have some combo boxes on a form with values that I have typed in directly.
I would like the user to click on these and the option selected will dynamically change a resultset.
Unfortunately, when I click on the combobox, the optionsare displayed, but clicking on each of the options doesn't do anything... i.e. the option does not become selected.

Am I missing a setting somewhere ?

View 12 Replies View Related

Select From Combo Box

Dec 11, 2006

I am probably doing this all wrong!

I have 2 forms (linked). One is plan, the other is plan contacts.

The plan contacts form is a continuous form and will hold a record of all the contacts for that particular plan. To select the contact (from that contacts table) i want to show, company, department, name.

As there will be hundreds of contacts i need to narrow this down for the user. My idea was to do this by using combo boxes. The first one will show a list of all companys, once chosen the second one will show all that companys departments and then finally all that deapartments contacts.

Any ideas? I am assuming this can be done through an SQL query?

Thanks

Kev

View 4 Replies View Related

Select ALL In Combo Box

Oct 14, 2004

I'm using a select query which gets its value from a combo box.The combo box has three choices: Male,Female,Both.

Filtering male and female is no problem. Is there a way to select all in the query?

View 1 Replies View Related

Combo Box To Also Select All Options

Oct 9, 2006

I am having an issue with a combo box on a form with the following query. It works exactly as it should, but unfortunatly, I need a little more.

cboASC is off a table, cboQCode is from values, If I don't fill 1 of the combo boxes I get a blank record (just fields).

What I need is an option to choose all Primary Locators and/or all Qcodes for a general report instead of a local report.

SELECT CallsEntered.[Work Order Nbr], CallsEntered.[Date Entered], CallsEntered.[Time Entered], CallsEntered.[Primary Locator Code] AS [ASC], CallsEntered.Headend, CallsEntered.Node, CallsEntered.[Grid Id], CallsEntered.[Q Code], CallsEntered.[Problem Code 01], CallsEntered.[Primary Finding Code], CallsEntered.[Primary Solution Code], CallsEntered.[Cancel Code], CallsEntered.[Scheduled Date], CallsEntered.[Wo Status], CallsEntered.[Date CheckIn], CallsEntered.[Assigned Installer], Calendar.Week, Calendar.Year
FROM Calendar INNER JOIN CallsEntered ON Calendar.Date = CallsEntered.[Date Entered]
WHERE (((CallsEntered.[Date Entered]) Between [Forms]![frmServiceCalls]![txtStartDate] And [Forms]![frmServiceCalls]![txtEndDate]) AND ((CallsEntered.[Primary Locator Code])=[Forms]![frmServiceCalls]![cboASC]) AND ((CallsEntered.[Q Code])=[Forms]![frmServiceCalls]![cboQCode]));

Your time and help is appreciated.

View 2 Replies View Related

Multi-Select Combo Box

Dec 12, 2005

Is there any way to have a Multi-Select Combo Box fill a single field in a table? I've been messing with this for some time now and just can't seem to figure it out.

Thanx in advance
Karen

View 4 Replies View Related

Select By Year In Combo Box

Sep 26, 2006

Hi all,

I have a database that use to record the training information, and there are two column that holding 2 date, Training From and Training To.(I use medium date as my Input mask.)

Now i wish to create a combo box to let the user to select by Year and output to a report to print. But how to make the combo box to show just year but not month and day?? eg. I have a training from 10-Dec-06 to 15-Dec-06 and another training from 05-Feb-07 to 10-Feb-07. so now i need a combo box that can show print by year 2006 or 2007 and the output report will showing all the training which trained in year 2006 if i selected 2006, how to make it? any idea?

Thanks!

Regard,
alex

View 2 Replies View Related

Cannot Select Item In Combo Box ?!?!?!?

Oct 24, 2006

Have a subform:
Name: frmProjectSub1
Default View: Continuous Forms

A combo box within the subform:
Name: cboProjectName
Control Source: Nothing
Row Source Type: Table/Query
Row Source: SELECT ProjectName FROM tblProjects WHERE tblProjects.Status LIKE "*" ORDER BY ProjectName;
Column Count: 1
Bound Column: 1
Visible: Yes
Enabled: Yes
Locked: No
Allow AutoCorrect: Yes
Tab Stop: Yes
OnClick Event:
Private Sub cboProjectName_Click()
With Me.frmProjectSub1.Form
Me.RecordsetClone.FindFirst "[ProjectName] = " & Me.cboProjectName
If Me.RecordsetClone.NoMatch Then
MsgBox "Can't find task " & Me.cboProjectName
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End With
End Sub

Within the continous form, if I name the Control Source as ProjectName, and traverse through the records, the value in the combo box changes to the current selected row.

Problem: In the combo box, I do get the dropdown list of projects, when I click on a project - Nothing Happens! The listbox stays open on the item that I clicked on -- does not close-up and put the selected item in the combobox window. I'm stumped...

View 3 Replies View Related

Combo Box Select With TWO Fields

Jan 28, 2005

I have a database of customers, and I'd like to be able to pull up a specific record on a form. Currently the only way I know how to do this is by ID number (the primary key). I'd like to be able to search by their last name and first name (of course we have people with the same last name), so for instance I'd like to be able to input "Smith" and then have a list of all the smiths to choose from. Is there a way to do this? Thank you!

View 2 Replies View Related

Forms :: Unbound Combo Box Populate Fields Linked Tables

Jul 18, 2014

I have form with an unbound combo box which is populated from a query

It should populate a field in a table which is related to another - however it only works when i query by id number (primary key) and not the text value i want - is it possible to query both so it returns say 1,option 1 - then when selected it will place a 1 in the table - which is related to option 1 in another table instead of just having to select '1' which will mean nothing to a user?

View 5 Replies View Related

How To Select An Item In COMBO BOX Programatically?

May 13, 2005

hi All..

I could set the Combobox.Value to one of the values in the combo box and combo box displays that value. But when I try to use Combobox.Value subsequently it does not have any value. I noticed that the value property is populated only when the combox box item is manually selected(highlighted).

How can I highlight the selection in a combo box?

Thanks in advance

View 1 Replies View Related

Using Combo Box To Select Data Criteria

Jul 11, 2005

I'm having trouble creating a query.

I work for a company which have a load of cd's which i've put into a database.

the database consists of a table which lists the contents, date created, department etc.

I've created a form where users can select (using combo box's) criteria to search the database.

It works well if the user selects relevant data from each combo box but i have now added a "select all" function to each combo box incase the user doesn't know the specific criteria.

This is where the trouble starts. I cant work out how to create the query so that if the combo box is on "select all" how it will show all records for that particular field.

I have tried to use an IIF function for each field in the query but i always get errors.

Please help.

View 1 Replies View Related







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