Listbox To Show Contents Of More Than One Fields In Another Table

Jun 23, 2005

I have a field called "Bad Pc Part" which is a listbox. THe problem is I want it to display the contents of 3 other fields from another table.

I created a query for the Bad Pc Part field but the problem is it only displays the information in the first field of the table. It doesnt show the contents of the other columns. I need it to do this.

Please Advise3.

View Replies


ADVERTISEMENT

Show Only One Instance In Listbox With Multi-table Recordsource

Oct 9, 2005

I've been trying to determine what recordsource to apply to a listbox to get the following results for its three columns:

Column1 Column2 Column3
AddressID Address Owner

The data is being pulled from two tables:

tblAddress
AddressID (pk)
HouseNum
Street
Apt

tblOwner
OwnerID (pk)
AddressID (fk)
LastName
FirstName
Current

Problem: I need each record from the Address Table to be shown with the most current Owner information from the related table. The most current Owner Information record is identified by a checkmark in the 'Current' field.

I've tried the following queries:

This query gives me duplicate addresses for each instance of owners:
SELECT DISTINCTROW [AddressID], [HouseNum] & ' ' & [Street] & ' ' & [Apt] AS Address, tblOwner.LastName AS Owner FROM tblAddress LEFT JOIN tblOwner ON tblOwner.AddressID=tblAddress.AddressID;

This query gives me only addresses that have a current owner, the problem is, sometimes a house won't have any related owner record in the owner table:
SELECT DISTINCTROW [AddressID], [HouseNum] & ' ' & [Street] & ' ' & [Apt] AS Address, tblOwner.LastName AS Owner FROM tblAddress LEFT JOIN tblOwner ON tblOwner.AddressID=tblAddress.AddressID WHERE tblOwner.Current = True;

Can this even be done with a query? This is driving me nuts. Help!

Scott

View 1 Replies View Related

Forms :: How To Add Listbox Contents To A Subform

May 11, 2015

I have five list boxes set to a table in my database. Here is what a few rows in my table look like...

ID IngredientName IngredientType Cost
1 Ham Meat $1.23
2 Beef Meat $3.45
...... ....
27 Lettuce Vegetable $0.22
28 Onion Vegetable $0.12
..... ....
38 Mayonaise Sauce $0.13

The five listbox controls each show the list by the IngredientType, so one listbox shows vegetables, another Meat, and so on. Multi-select is turned on for each listbox. Here is what I want to do: In the form I want to have a subform that will show what the user clicks in listboxes. This running list, with an extra column next to it that will accept a number. Example: say the user selects 'Ham' from the meat listbox. The subform should then show 'Ham' and a space next to it where he can type an integer (allowing for more meat).

Subform:

Ham | 2
Lettuce | 1
Mayo | 1
Subroll | 1

If the user de-selects the item in the listbox I'd like the subform to delete the item from itself.

View 13 Replies View Related

Forms :: Mirror Contents Of Listbox In A Textbox

Aug 14, 2014

I have a drop down box where I select a Retailer. When this choice is made I want the last invoice entry to appear in a text box. I have attempted this by creating a query which contains the top 1 invoice in descending order. My dropdown box Event updates a hidden List box using List677. Requery and List677 has a SELECT statement in Row Source

So far so good this bit works

I want to use this value as a default in a Textbox. I thought I could use the same trick to populate the Textbox as I did the Listbox so i tried Text232. Requery after the List677. Requery in the Event above. But no it does not update. The only time the textbox updates is if the Listbox is in Focus and as I said this List box is Hidden. How can I get the textbox to change in real time... I would use the Listbox but i need to be able to change the value of the contents to run reports, I just want a default value.

textBox Default Value: =[List677]
textBox Control Source: =[List677]

List677 Row Source: SELECT LastInvoice.Invoice FROM LastInvoice;

View 1 Replies View Related

Reports :: Listbox Page Break When Contents Exceeded

Jul 28, 2014

I created a report that would generate, among others, a listbox on monthly payments. How do I make it spill-over to the next page when its contents have already exceeded that of a single paper?

View 1 Replies View Related

Forms :: Listbox To Show Types Based On Section In Other Listbox

Sep 9, 2013

I have a list box called "product list box" based on a query called "searchqry", i also have another listbox called "type list box" , how do i get the type list box to only show "types" based on the section in products list box?

View 1 Replies View Related

Memo Field, Will Show Only Partial Contents On Query

Mar 24, 2008

Running 2007

I never ran into this problem before.
I have a qry, with showing totals (group by). One of the fields is called comments, which is a memo field. I am only seeing partial comments.

When I redesign the query and take out the "totals", I see the entire comments.

Is there a fix to this?

View 4 Replies View Related

Copy Contents Of Fields To Other Fields, With Macro?

Nov 30, 2004

Hi,

I hava a small dbase in which we store address information. Now you have a visit address, a mailing address and billing adress.

I want to use some buttons which trigger macro's to fill in these "Secondairy" addresses FROM the visit adress.

So a buttun that says: copy billing address from visit address. and then the street, Number, PO box en city will be copied from the visit address to the billing address.

It's probably possible through a macro but I'm having a hard time coming up with the syntax. Or it there an easier way? :confused:

I hope you guys can help me out. THANKS!!

View 3 Replies View Related

Basic Fields Must Automatically Show Up In The 2nd Database Table. Plz Help. Thanks.

May 29, 2007

Hi Everyone.

I am new to MS Access. I got two databases. The 1st database consists of the basic fields like the department,adress,salary etc of the employers(Primary key is the ID). Now in the 2nd database I have the same basic fields and some extra fields. Now my requirement is to when I enter the ID in 2nd database, all the basic fields have to be filled up based on the 1st database( May be I should link the 2 databases).

I really appreciate your help.

Thanks in advance,
Anil.

View 2 Replies View Related

Queries :: Show All Fields With No Matching Records - One Table

Aug 14, 2013

How to get the following results using 1 table:

Field1 ID is an auto record ID, field2 ID is actually field1 ID assigned that record, in other words record 1 has a roommate (record 5) assigned to it, record 2 has a roommate (record 4) assigned to it

Table A

Field1 ID Field2 ID
1 5
2 4
3 6
4 2
5 1
6 8

Results records I'm looking to display for would be:
1 5
2 4
3 6
6 8

I only want to display all fields for records, but I don't want to show their matching record, so I want to display record1, but not record 5 because record 1 has record 5 as a roommate, want to display record 2 but not record 4.

View 5 Replies View Related

Check Contents Of Subform Fields

Mar 24, 2006

I have a repair database which I'm working on. On the main WIP form there is a subform stating the faults which have been logged against that unit. The unit can be scrapped at any time by hitting the SCRAP button, but if the unit has had it's faults successfully repaired, then it can then be FINALISED which means it can be shipped to the customer.

I need to be able to check the records in the subform, to look for faults which have not been repaired. When they are repaired, the text "PASS" will be present in the TEST_RESULT field. I want to be able to check the TEST_RESULT field for each fault to ensure they are all a PASS before I allow the unit to be FINALISED. Any ideas how I can do this? Or am I taking the wrong approach?

Thanks,
Gareth

View 10 Replies View Related

How To Update A Field With Contents Of Two Other Fields

Jul 3, 2012

I'm an excel user and in using excel I can take two fields and combine their data in one field. I've got about 6 database files with anywhere form 1000 to 3000 records that have already been prepared and imported into access database files .mdb and I realize that the firstname lastname fields need to also be combined into a contact field with both names. In Excel it's easy in access I'm a little lost. I was looking to an update query however I can't find instructions on what I'm trying to do.

View 2 Replies View Related

Hide Fields On A Form Dependant On Contents Of Txt Box?

May 16, 2005

Hi,

How can I get access to hide certain fields or controls on a form if a certain field has no data?

Allow me to explain further:

I have a form that displays data = frmPlantMain
and a associated image = Image1
The image is stored outside of the db as a jpeg and the field in the record source table (Image1) contains a link to the image. For example: C:databasePicture1.jpg

There is also a hidden text box that contains the message "No Image available" = lbl_NoPix
This would be displayed in place of the image if no image has been inserted.

I also have a seperate "insert new image" command button = cmdInsertPic

If the current record has a image then I want to have the controls Image1,lbl_NoPix & cmdInsertPic hidden. This seems fairly easy but it gets more complicated now.

If there is no image I would like these controls visable so that the user can add a new image. I would then need the record to be requiried or refreshed to reflect the fact that a new image has been added.

This is where I fall down - I do not know how to tell access to look at the field in the table (Image1) and if there is no linked or associated image then set the visable propertys of controls a,b & c on the form to true.

I hope I have explained my problem correctly and I thank you for your time in advance.

Regards,

Kenny

View 5 Replies View Related

Queries :: Design A Query To Show Only Empty Field As TEXT Fields In Table

Mar 2, 2014

I am just querying a single table, no relationship involved with another table. As you can see form the attached jpeg, the ZIP field in some cases is empty. I would run a search using Is NULL but the field is NOT numerical. It's a long story but I had to make this field a TEXT field. Basically, what statement do I have to insert in the criteria field to just pull up the EMPTY ZIP fields?

View 2 Replies View Related

Forms :: Only Show Certain Values In ListBox

Jan 30, 2014

So I have a multi-select listbox with tick boxes and values in on my form. Is it possible to make so only the checked values are showing up and then not display the tick box?

I know I can use a combo box to display several values, but using a listbox like this would be easier on the eye.

Is it possible to use code to get a text box to show the selected items in the list box?

View 5 Replies View Related

Forms :: Listbox Results To Show 3 Decimals?

May 30, 2013

I have a list box that is fed by a query. I have fields that are stored in the table as numbers (Type is Double and Standard Number with 3 decimal places).

In the tables I see the numbers 10.000 which is correct, in the query is see 10.000 again correct, however the list box on the form only shows 10.00?

View 3 Replies View Related

I Cant See A Table's Contents As It Is

Jan 21, 2007

sorry for the title. i didnt know what to write.
this is the situation:

i have a form where it populates a table in access (ssmdata) from an oracle table w_ssm_data). this works perfectly.

Then the form read the hole new table in access (ssmdata) to update a specific field.

Problem:
If i open the access table (ssmdata) it is sorted by the flight fields. However, when the form reads the table in order to update the specific field the table seems to not to be sorted by the flight field.

More info:
The ssmdata table in access has many primary keys (flight, departure,arrival,caterer,frequency and aircraft).

If i take a look to the W_ssm_data table in oracle it is not sorted by flight and it is sorted in the same way the form is reading the ssmdata table in access.

example:
table in access:
flight dep arr caterer aircraft frequency
1 a b a 111 67
1 a b a 222 134
2 c s c 111 5


table in oracle:
flight dep arr caterer aircraft frequency
2 c s c 111 5
1 a b a 111 67
65 t h t 252 1


when the update step starts it reads the access table as it looks in oracle. but if i open the table in access it looks sorted by flight.

thx 4 your hlp again, max

View 3 Replies View Related

Then Click One From Listbox Show Fault Info In Textbox

Aug 29, 2006

hi, i have list box and the source coming form Query. i want when i click on
one in list box want it will show [faults] field in textbox from query
the field [faults] is a memo can someone help me
__________________
David

View 3 Replies View Related

Show Certain Records (eg: Unpaid Transactions) As A Different Colour In A Listbox

Nov 30, 2006

i think this post may benefit others because to me it seems like a good idea,

a listbox displays 2 fields from your database

job table
id (autonumber primary key)
pay (text)

here are 5 records,
1,paid
2,paid
3,paid
4,unpaid
5,unpaid

if you make a form with a listbox showin these records..

is there a way to make the unpaid records appear as red?

View 9 Replies View Related

Modules & VBA :: Listbox That Show All Queries And Run On Double Click

Jun 25, 2013

I have an access form which i have turned of menus, navigation and shift key. What I am looking for is to have buttons on my form to allow users to create and delete queries from my form. I already have a listbox that shows all the queries and runs them when a user double click on them.The codes needs to run in access 2007-2013 in both 32 & 64 bit versions.

View 3 Replies View Related

Modules & VBA :: Show Results From Multiple Tables In One Listbox

Aug 4, 2013

I have multiple tables (Desktops and Telephones)

A search form, to search into those tables (It searches by "User")

The search form contains a listbox that shows results (listPC)

And the following code:

Option Compare Database
Dim strUserPC As String, strUserTel As String
Dim db As DAO.Database, rsUserPC As DAO.Recordset ', rsUserTel As DAO.Recordset
Private Sub txtSearch_LostFocus()
strUserPC = ""
strUserTel = ""

[Code] .....

It works, but I have one problem. It only shows telephones or desktop, not both. It deppends on which line inside UpdateList is first.

That example searches into 2 tables:

-Telephones
-Desktops

And searches by "user".

I want to list all telephones and desktops that a user has assigned.

What should I change to show both results?

View 9 Replies View Related

General :: Combobox Filtering Listbox To Only Show Same Records

Apr 4, 2013

Ok I have a list box (CounselorInitials) and a listbox (AssignedToYou)

The list box has 6 columns and is using a query (AssignedToMe). The important one is the 6th one (Counselor). All working off a table called DityLog.

I want to select initials in the combo box and then it will filter the listbox and only show records that are the same.

So if I select initials MC from the combo box I want the Listbox to show all records that have the initals with MC.

View 1 Replies View Related

Copying Table Contents

May 18, 2005

Hi,
I am trying to copy the contents of a table with 11 fields into a new table which is the same except for an additional two fields at the end.
Any advice would be appreciated..
Thanks..

View 2 Replies View Related

Any Way To Read CD Table Of Contents?

Oct 23, 2011

Any way in MS Access to read the TOC data from an Audio CD? It is I believe in the lead-in part. I have a music database, and would like to be able to read the track data directly from the CD (Title, artist, timing), without having to type it all in again.

I know this can be done, because my CD labelling software extract the data automatically - but can Access do it?

View 3 Replies View Related

Table Of Contents Off By One Page

May 8, 2014

I have some code to create a table of contents/index for a report which has "chapters" which can be added or dropped depending on whether we choose to stock something or not. And I'm getting the strangest issue. The very first "chapter" starts fine on Page 1. But the next item we sell (Chap 2), then starts on Page 3, instead of Page 2. Here's what's strange. Every other item is then one page off. Below is my code.

Code:
Option Compare Database
Dim db As Database
Dim TocTable As Recordset
Dim intPageCounter As Integer
Function InitToc()
'Called from the OnOpen property of the report.

[Code] ....

The InitToc fx is called upon the opening of the pricebook, the UpdateToc fx is called upon printing. There's something in here where I think I'm calling the functions incorrectly, but I'm not sure quite what the error is.

View 8 Replies View Related

How To MessageBox Contents Of A Table With A Button

Feb 27, 2007

This may seem a very simple question, but I really don't know how to do it. Basically, I want to MessageBox contents of a table with a button. I have a table called Map, and has two fiels: Column Number and Description. When a button is pressed, then I want a messagebox to come up and show the column number and the description of a single field. Although I know it is very wrong, here is the code I used for this (r![column Number] = 4 is meant to be the forth column number in the table):

Dim d As Database
Set d = CurrentDb
Dim r As Recordset
Set r = d.OpenRecordset("Map")


r![column Number] = 4
MsgBox "Column No: " & r![column Number] & ". Description: " & (r![Description])

By the way, there are seperate buttons for seperate fields. It is DAO as well
Thanx in advance

View 6 Replies View Related







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