Show Only Certain Related Records In Combo Box

Oct 14, 2006

I have a feeling this is a common and probably easy question, but I couldn't find anything on it in the forums.

I have a main customer form with multiple subforms on it to keep track of my clients insurance policies and claims. I enter their contact data in the main form, and the policy data on one of the subforms. Then when they have a claim, I enter the policy information on the claim subform as well.

How could I have the combo boxes in the claims subform (which is storing data in a claims table) only show the policy numbers (stored in a policies table) assigned to that particular person? I would assume I need to somehow filter the policies query so it only shows records for that particular person, but I'm not sure how to do that on the fly.

View Replies


ADVERTISEMENT

Show All Records That Have More Than One Matching In A Related Table

Dec 16, 2005

Hi,
I've been trying to get this for ages now - both in the design view and in sql:

I have 2 tables - one called DrawingsRegister and a related one called DrawingRevisions. Each drawing has one or more drawing revisions. I want a query that will show each drawing (just once) that has more than one revision:


SELECT tblDrawingsRegister.DrawingNum, tblDrawingsRegister.DrawingName, tblDrawingRevisions.DrawingNum

FROM tblDrawingsRegister INNER JOIN tblDrawingRevisions ON tblDrawingsRegister.DrawingNum = tblDrawingRevisions.DrawingNum

WHERE ((Count([tblDrawingRevisions]![DrawingNum])>"0"));

Thanks for your time,
RCurtin.

View 1 Replies View Related

Show All Records From One Query And The Sum Of A Field In A Related Query Record

Mar 8, 2005

I'm building a report for annual software license renewals. The report data source is a query that combines the customer information, their computer information, and the licenses purchased for that computer. I am having no trouble with the form displaying the customer info page, then a page with the computer info at the top and a list of licenses purchased for that computer underneath.

That would be great, if that's what my boss wanted. However, she wants the whole list of available licenses displayed on each page, in the event someone want to purchase additional licenses with this year's renewal.

I'm trying to figure out how I can set up a query/report grouping to do that. I've tried making a new query, relating the qryLicense!licenseID to the qryPurchase!purchLicense and setting the relationship option to show all records from qryLicense and only those related from qryPurchase. I added the qryPurchase!purchCPU field to my query, hidden it, and set the criteria to “=1” (the computer ID of one of my dummy computer records). I also have a Sum of the qryPurchase!purchQty field included in the new query that I want to display the total number of that particular license purchased (and 0 if there are no corresponding records). All fields except for the quantity field are set to Group By.

What I’m getting from this is simply a list of the licenses purchased for that computer, not the complete list of licenses available showing the quantity purchased where applicable.

Can someone see where I’m going wrong?

Slaughter
slaughter at mizzou dot edu

View 9 Replies View Related

Null Combo Box; Show All Records

Feb 11, 2006

Hello All,

I’m using a combo box for the criteria for a saved query. Is there any way to show all the records if the combo box value is either “0” or null?

Thanks,

View 4 Replies View Related

Show Filtered Form Records In A Combo Box

Oct 17, 2006

This sounds like a cascading combo box issue but it isn't quite.

I filter my form using 2 unbound combo boxes which can be used in any order, both of which define text strings using case select. These strings are concatenated into a filter text and applied by a routine called in the after update event of either combo. All works well.

My question: How can I show all the filtered records in a third combo box so that users can easily select the record of interest from the filtered set?

I attempted to define SQL for each combination of the 2 comboboxes but it was getting ludicrously complicated so that got the heave ho.

After that, I attempted to use a recordset clone, but I couldn't get this to work:
'Clone record set for combo box rowsource
Dim R As Recordset
Set R = Me.RecordsetClone
R.Bookmark = Me.Bookmark

'Populate combo box with recordset
With Me![cboProjectList]
.RowSource = R
.Requery
End With


Reading the Access help, it seems that a combo box can only be populted via query, table or SQL. Is there any way of using a cloned recordset or the me.filter to show the filtered form records in a combo or list box?

I will be very grateful for any pointers.

View 8 Replies View Related

Forms :: Combo Box Wants To Show Records Not In List

Apr 4, 2013

I'm sure there is an easy way to do this but I have not clue.

I have three tables:
Students
STUDID (pk)
txtFname
txtLname
etc.

Classes
CLASSID (pk)
txtClassName
txtClassRoom
etc.

Student_Class (join table)
STUD_CLASSID (pk)
fk_StudID
fk_ClassID

On my Class form when assigning students there is a combo box which shows the students names. Once a student is picked in the combo box their name shows up in the subform.

What I would like is a way to NOT show a student in the combo box after they have been selected. Is this possible? Or should I be looking at another way of doing this?

View 13 Replies View Related

Show Records From Three Combo Boxes Simultaneously

Jan 16, 2015

I have three identical Combo Boxes which show the names of the classes in our school. They are just three copies of the same combo box. What I want is this: I choose three different classes from these three boxes. Then I want a button at the bottom which when pressed, should show the records of these three classes separately. Preferably, as three columns.I have made the Combo Boxes, but am stuck at the button to perform these actions.

View 11 Replies View Related

Forms :: Combo Box Not To Show Previous Records Already Selected?

Apr 27, 2014

I have a form that has four combo boxes on it that enable the user to select entrants in a golf tournament for tee off times and tee. (I have attached part of this database to this post) It all works fine but after selecting the first player in the first combo box and then selecting the second combo player I would like the player selected previously not to show up. Is this possible or do I have to rethink the way players are selected.

View 5 Replies View Related

Modules & VBA :: Combo Box To Show Records Relating To A Specific Record

Jun 11, 2013

I have a combox field on subform C that shows records from a query.How do I get this combo to only show records that relate to an ID on subform B.I have a subform for storing contracts and these are stored against a company name.On subform C I have a field that currently shows all records in a table. I need this combo to only show the records that relate the current record on subform B?

View 4 Replies View Related

Queries :: Sort Out Invoices By Year - Query Based On Combo Box To Show All Records

Mar 4, 2015

I am trying to have a query sort out my invoices by year but also to have the possibility to show all invoices.

I have one table "INVOICE" where I have a column "YEAR" calculated with DatePart function from the invoice date.

On my form "INVOICE LISTING", I want to have a combox "Combo957" selecting the year. I have forced the "ALL" selection to the combox using a UnionQuery.

My problem, I cannot get the query to work. I have tried many ways, the closest I can get is :

IIf([Forms]![Invoice Listing]![Combo957]="ALL",([Invoice].[Year])<Year(Date()),[Forms]![Invoice Listing]![Combo957])

If I select the year from the combo, it works, if I select "ALL" nothing is shown.

here is the full SQL

SELECT DISTINCTROW Companies.Company, Companies.City, Companies.Country, Sales.Brand, Sales.Type, Sales.Date, Sales.QuoteNo, Sales.Delivered, Sales.Account, Sales.Branch, Invoice.InvoiceNumber, Invoice.InvoiceDate, Invoice.CustOrderNumber, Invoice.PaymentTerms, Invoice.DueDate, Invoice.NetAmount, Invoice.TotalAmount, Invoice.Tax, Invoice.PaiementRCVD, Invoice.Overdue, Invoice.Month, Year([Invoice]![DueDate]) AS DueYear, [Invoice]![month] & " - " & [Invoice]![Year] AS InvoiceMonth

[Code] .....

View 5 Replies View Related

Forms :: Show All Records In Datasheet Subform On Form With Combo Box Filters On Load

Apr 1, 2015

I am having an issue trying to show all records when I load my form. It loads correctly when I don't have a record source for the main form. However, the combobox filters will not work. My goal is to have users be able to use the datasheet, subdatasheet and combobox filters. I can get the form to work just fine when I link the Main form and subform, but when the form opens it is filtered on the first record. I have been successful with this approach when using other forms, but they didn't require a subdatasheet.

Is there anyway I can have the comboboxes to filter yet be able to show all records until the user selects filters? Is this possible?I finally got my Manager to agree to use a database instead of Excel files based on this form setup and I need to make as "user friendly" as possible (look and function like a spreadsheet) I attached some pics of the form along with the code for the filter.

View 1 Replies View Related

Modules & VBA :: Query To Compare Values To Show All Records Where Form Combo Value Is Selected

May 1, 2014

I am building a tracking database where we would be able to track information which field are null data and report them to our Administration to fill the null data. For this I have created a form name "Search" and I have a combo box control on that form which is bound to "Table = employee" and its ROW SOURCE TYPE="Field List", I would like to able to query records where the selected value in this combo box is null through out the table.

For example if I select "Telephone" from this combo box dropdown, I would like the query to show all the records where the "Telephone" is null, how to set the criteria in query to take the combo box value as "Field Name" and then compare it with the Field/Column in the table and show the null values.

View 4 Replies View Related

Lookup To Show Related Values

Aug 19, 2011

In the attached Database, I have four tables. The purpose of the Database is to track training for employees. A quick description of each table:

Employees: List of employees requiring training
Course List: List of Courses offered
Course Schedule: When said courses are offered (one to many relationship with Course List). this has a Composite Primary key consisting of the Course Number and Section Number
Course Attendance: This is to track which employees attended which class.

Question 1:
In the Course Attendance table, the first field (SOS Course Number) looks to the Course Schedule table. This field uses a lookup to select the course and section number, but only displays the course number. How do I get it to also display both the course and section number (don't care if it is displayed in one or two columns)?

Question 2:
Similar problem, except the second field is Employee Last Name which is a lookup from the Employee table. I want to display both last and first name in two separate columns.

Note, I realize there are spaces in table and field names. Please ignore this for now. It will be fixed later.

View 1 Replies View Related

Reports :: Show Different But Related Value From Field In Form?

Apr 16, 2015

In a form of mine, I have the user input other person's initials, but I don't want those initials showing up on the report. It's a set group of initials to work with so I have each set associated with a random 3 digit number (that I input into the table myself). I'd like to be able to have the person input the initials in the form, but have the numbers display on the report, I'm not sure how to go about doing that.

View 5 Replies View Related

How To Store ID On List Box But Show Related Data

Oct 10, 2012

I have 2 tables one, Contacts, primary key ContactID this table contains names, addresses etc and one group called Form primary key Form ID, foreign Key Contact ID. I want to store the related contact ID in my form but display firstname ad surname from Contaacts list. This works fine when I am selecting name. List box shows 2 columns with correct data but when I recall the form after making other entries it only displays the firstname. The correct ContactID is stored. Why does this happen.

If I can get this working I would like to concatenate the Firstname and surname to make it more readable but don't know where to begin.

View 3 Replies View Related

Modules & VBA :: Control Tip To Show Related Record From Another Table

May 18, 2015

Is it possible to have the control tip show related records from another table?

I've been looking around the internet, and I've seen many examples for showing concatenated fields on current record, but had no luck with what I'm trying to do.

For example.

I have a continuous form, and on it shows top line data. Where a record in this form shows as "Split" it means I have more data related to this record on another table.

Is it possible to show however many fields are related to this record, when I control tip, or mouseover?

I've been playing with

Code:
Me.textbox.ControlTipText = Me.textbox

but was wondering, if this is possible, how I'd reference the other table,

If said column of continuous form is "split"...
lookup related table by ID number
show however many columns of data..

View 2 Replies View Related

Modules & VBA :: Show Related Record For Current User

May 11, 2014

I was creating a program using ms access. consist of 2 table of database called employee and userlevel.. in employee table have ID, name, username, password,userlevel, and others related employee profile.. and in userlevel table, it consist of admin level and normal user level.. Userlevel table allow to differenciate admin and normal user(employee) .. in my program each employee having their own loginID and pass to access their own data.. the problem with my program now is displaying the data that belong to the logged in employee. its mean that it only show the data that owned by currently user that logged in..

View 7 Replies View Related

Reports :: Show Info Even When Related Table Has No Data

Mar 26, 2014

I would like to create a report that would really impress my supervisors, i just started at the company. I'm trying to create a call action plan, so i'm recording clients information on one table, and meetings we have had with each respective client on another table. Some clients will have multiple meetings, some few, and some none. I have a relationship set between them from the client's id number on the client table to the ClientID on the meetings table. one to many.

When I go to create the report, only the clients with meetings show up on the report, I would like client info to always show up on the report and meeting info to only show up under each respective client when it exists. I have worked out how to shrink and hide any text box without any info on it. It just seems like the existence of a meeting dictates where the client will show up at all in the report.

View 1 Replies View Related

Forms :: Requerying Subreport On Tabbed Control - Show Related Data

Jul 4, 2014

I have a form with a tabbed control on it. The tabbed control has 4 tabs that each have a report on them. When I select a company name on the main form, I requery these 4 reports to show data related to that company.

For some strange reason, 2 of my reports requery with no problem, and 2 of them give me a message that the report can't be found. Here is the code:

Code:
Private Sub cboCompanyName_AfterUpdate()
On Error GoTo cboCompanyName_AfterUpdate_Err
' DoCmd.SearchForRecord , "", acFirst, "[CompanyID] = " & str(Nz(Screen.ActiveControl, 0))

' After selecting a company, requery the subreports to display the appropriate data

' These 2 work

Forms!frmCompanyHistory!RptCompany_Projects_Brief.Requery
Forms!frmCompanyHistory!RptEmployeesSpecificCompany.Requery
'These 2 Fail
Forms!frmCompanyHistory!SubRptCompany_Payback.Requery
Forms!frmCompanyHistory!SubRptCompany_Revenue.Requery

'Other things I've tried

'Forms!frmCompanyHistory!TabCtl66!SubRptCompany_Payback.Requery
'Me.TabCtl66!SubRptCompany_Revenue.Requery

As a side note, if I chose the company, say "ok" to the error, and then go run the queries that these reports are based on, I get the correct records. Also, if I chose the company and run the 2 failing reports standalone, they work fine, so I know the problem isn't the reports or the queries themselves.

I have also checked and rechecked for any spelling mistakes and have found none. I should mention that the error message is "Programs cannot find the field 'SubrptCompany_Payback' referred to in your expression".

View 8 Replies View Related

Queries :: Mass Duplicate Main Records And Related Subform Records

May 29, 2014

In my simple database (attached), I need to mass duplicate Tasks and their Notes.

I have three tables: tbTasks (PK: Task_ID), tbNotes (PK: Note_ID), jtbTaskNotes (FKs: Task_ID and Note_ID). jtbTaskNotes is my many-to-many junction table that ties Tasks to Notes.

The main form (fmTasks), bound to tbTasks, has a subform (sbfm_TaskNotes) that displays notes associated with each Task. On themain form,you select which Tasks you want duplicated via a checkbox. The append query (quCopyTasks) will duplicate all tasks that have the checkbox checked. All good there. However, I can't figure out how to also duplicate each task's Notes.

I found Allen Browne's solution [URL] ....., but that only handles duplication of one record at a time, whereas I need to duplicate many records at a time (sometimes 10+ records). How do I go about duplicating multiple Tasks and their associated Notes?

Before you ask "why are you duplicating records?": There are times when tasks need to be re-accomplished and therefore need to have a new record. It's easier to duplicate records than it is to hand-jam everything again.

View 5 Replies View Related

Related Combo Boxes

Sep 13, 2005

I have Table Products and Table Types. I've created another one ProductTypeRef where i save the references. For example:

Products
Id Description
1 Shoes
2 Clothes
3 Hats

Types
Id Description
1 Athletic
2 T-Shirts
3 Trousers

ProductTypeRef
IdProducts IdTypes
1 1
2 2
2 3

I have two combo boxes, Products and Types. How can i relate these two combo boxes?I mean if the user choose Shoes from product combo box, he'll get (as a choice) only the Athletic (or all the available values for the Shoes product) from the types combo boxes.

Any suggestions?

Thank you in advance.

View 2 Replies View Related

Combo Box & Related Field

Mar 6, 2008

Hi,

Can anyone tell me how I can do the following without using code: I think it's really easy, and am sure I've done it hundreds of times before, but my minds gone blank...

When I select an entry from a combo box in a form, I'd like a related entry to appear in another field on the same form. I have a table with the both fields stored in it, although theres only 3 records so this might not be necessary.

Many thanks,

Nicola

View 1 Replies View Related

Problem: Related To Combo Box

May 18, 2006

Hello folks!

I've got a problem between a form and report, hope the fellows can give me a big hand!

Here i have a PO form with a combo box where i choose a "staff name" from a list (rowsource select from "staff name" table, there are "key" & "staff name"). The combo box would be filled or left blank.

Then a PO report would be generated, certainly the staff name would appear on it.

Problem 1 is, i want to show the name on report, while only the key is entered in PO form.

Problem 2 is, i cannot simply add "staff name" table into "PO" query, otherwise "PO" without "staff name" won't be shown. what i mean is, so far I can't make both "staff name" key and name appear in PO form.

Thanks you!!!

View 2 Replies View Related

Related Records

Aug 28, 2007

I've been using an access d/b for ages, it's one of the template (Orders) databases included with access but modded to suit my own use. copy attached with customer details removed.

Last time I used it it worked fine but yesterday, when I tried entering order information, I get an error saying cant add or change a record because a related record is required in table orders.

Can anyone shed some light on the potential problem? Bear in mind I'm not an advanced user and have very limited knowledge on relationships in access.

Thanks in advance.

Marc

View 4 Replies View Related

First/Last Of Related Records

Oct 13, 2005

The "last" total in an Access query is unpredictiable. I have a Journal, with the main form/dataset being linked to the entries of that day. I would expect the 'last' total word to give me the last entry of that day, ie. what I ate for supper. But in the two qrys shown, it does the opposite. What is the most relable way to get the last entry of that day (ie. the one with the highest journalID)? :confused:

Sample Database attached.

View 7 Replies View Related

Min Value And Related Records

Oct 29, 2005

Hi,

i need a query to return the first orderdetailsID and related productsID, so that all the other products that are the same as oldest order can be manufactured together.
In access help menu it shows it would be something like using the criteria under productname1 field:
(SELECT [productname1] FROM [the next one to cut query] WHERE min([orderdetailsID]))
But this returns an error cannot have aggregate function in where clause
min([oderdetailsID])).

I've also tried with 2 queries, 1 with the min function and the using inner join, but can't get it to work.

Thankyou

View 4 Replies View Related







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