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 Replies


ADVERTISEMENT

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

Select From List BOX Of List Of Choices And Store This Into A Table

Aug 21, 2013

I created a form and created on it a list box which is a query that grabs certain number of fields from different tables. I would like the user to select from this list box of a choice and then store their selection into a table.This list box has three fields, but it needs to store the id rather than the item, the user would see the name of the item but the id of the item would be store into another table, called bid. It store all these three fields when a user selection one of the item from the list.

View 13 Replies View Related

Forms :: Check Box List - Show Data Vertically?

Jul 11, 2013

I have a check box list on my form for all 50 states, so the user can choose any number and any combination of possible states, which I need the user to be able to do, but when it displays the data it does so horzontally and delineated by a comma. The problem with this is that if enough states are selected, it eventually gets cut off at the end and doesn't display the last states. Is there any way to make it instead show vertically, since at least with that I can format around it and not have a horizontal bar going all the way across the form?

View 14 Replies View Related

General :: Limited Size For List Box Column To Show The Data?

Feb 26, 2013

The column in my list-box did not show all the text i save in the table field. is there any limited size for list-box's column to show the data ?

View 2 Replies View Related

Forms :: Store User Name In Table And Show Up In Field

Aug 27, 2014

I managed to count the performance of users. The only thing I need to do is to put the names of the users on the form (under different tab) so I can select them and they show their performance. The best would that they are showing up there in the form till I change the names. I use now a text field to write the name, but when I close the database and open, I need to add the name again.

If I could use somehow the names from the users stored in a table, that would be great.

View 4 Replies View Related

Store Multiple Values From List Box

Jan 11, 2006

Hi all,

I was thinking/hoping of using a list box on my form to store multiple values, I haven't been able to find a way of storing any value so far so not sure how easy it will be?

How can this be achieved or is it just easier to use several check boxes (approx 8)

Thanks

View 3 Replies View Related

Store Multiple List Box Selection In Text Box

Jan 11, 2007

I created a button that when pressed concatenates any items selected in a list box and places them in a text box on the form with the format of "itemselected1" or "itemselected2" or "itemselected3"

However, I need to set the criteria in a query to look at this text box and return the results based on that selection. When I do that I get no results even is the query should run fine with that type of format.

Attached is a copy of the Code for the button and the result
Dim txtValue As String
Dim varItem As Variant
Dim strlnameselect As String
Dim intCount as Integer
'Cycle through selected rows in listbox

For Each varItem In Me.Queueselect.ItemsSelected
intCount = intCount + 1
Select Case Len(txtValue)
Case 0
txtValue = Chr(34) & Me.Queueselect.ItemData(varItem)
Case Else
txtValue = txtValue & Chr(34) & " Or " & Chr(34) & Me.Queueselect.ItemData(varItem)
End Select
If intCount=Me.Queueselect.ItemsSelected.Count Then
txtValue = txtValue & Chr(34)
End If
Next
'Assign variable value to textbox
Me.Queuetorun.Value = txtValue

End Sub

the result in the text box is
"A" or "B" or "C" or "D"

View 3 Replies View Related

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 6 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

Modules & VBA :: Using Array To Store Selected Items In List Box

Apr 10, 2015

I want to use an array to store data from a list box into a variable. I want it to be able to store one value, or multiple values, depending on what is selected.

Main problem: this list box feeds off a table which has employee names and their e-mails. The list box itself only shows the names, and when I select what I want the array to store is their e-mails, not their names.

Code:
Dim strNames As String
Dim varItem As Variant
Dim intCount As Integer
For Each varItem In Me.lstNames.ItemsSelected
intCount = intCount + 1
Select Case Len(strNames)

[Code] ....

That code successfully displays the item I selected, but only displays the name. I need to make it look in the table and get me column #2. I also want it to be able to select more than one item at a time.

View 5 Replies View Related

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

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

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

Getting Values Related To Dropdown List?

Feb 7, 2007

Hi!
I have a tables.
One is called: products => prdouctID,productName, ProductPrice

I created a dropdown list.
To read in the values of productName.

I wanted to have a textbox / label which will update the productPrice.
If i select productName as "Pirates", the textbox/label will show $50.00
If i select productName as "Who let them out?", the textbox/label will show $80.00

I have managed to do the dropdown list but cant seem to figure out the label / textbox.

Please advice?
Cheers!
Darence

View 2 Replies View Related

Access Related List Boxes

Apr 29, 2005

I have a music database created in Access.

I have lookup fields for CD Group and CD Name
Do I need a autolookup Query or Syncronized combo box to perform the following function.
Filter by Form
CD Group
Select from List box
CD Name only Display CD's related to that Group

Mormon Tabernacle Chior Cd Group
Only display CD's related to the Mormon Tabernacle Chior
NOT ALL RECORDS IN THE DATABASE.

I've bent my self backwards on this and get no were I know it might help me with some visual basic coading.
The only resources I have is some books on Access
I Live in a Rural Area and there are no computer coarses near me that fit my time.

This following procedure I think would be done for example with any Products Database let's Say like Bakery Items
NAme of Company
Nabisco
NAme of ITems
Crackers
Cookies
Only display products by each item Name
NOT ALL RECORDS IN THE DATABASE WHICH ARE BAKERY ITEMS IN THE LIST
wHEN I FILTER BY FORM

PLease email me at
mikevds@optonline.net
So somebody can get back to me on this
I can even send you some screen shots if you don't get what I am getting at.

View 1 Replies View Related

Cd Author List Box Related To Subform

Jun 16, 2005

I have the folloowing tables in the database

tblCD/Main: CdID - autonumber, CDName - text ...anything else will be a lookup field that we will get from another table, so we will come back to this table

tblAuthorType - AuthorTypeID - autonumber, AuthorTypeName - text. author type name will have, as I see it, 3 types : Composer, Group, Artist.

tblAuthorName - AuthorNameID - autonumber, AuthorName - text, - the name of all authors, composers and artists that u will pick from later

When I select Author which can be a cdgroup which is fine it will display those cd's related to the cdname. Such as Author TypeName Composer, Group. Artist.
tblTrackNumber - -Name of Song TrackNumID - autonumber, TrackNum
I have a subform and I want it to go to the tbktrack number with Name of Song related to that CD after I select an Author from the list box.

I am fairly new to this I need the vb codes for modification
mikevds@optonline.net

I set up these tables so then the relationships will refer back to them.

View 1 Replies View Related

General :: Remove Customer From List But Keep All Related Info

Sep 26, 2012

Let's say I have a list of customers. For each customer I have much more info on other lists (order list, personal info list, bank info list, and so on) - all are of course connected properly.

Now let's say a certain customer is no longer my customer, so I want to remove him from the customer-list. But, I want to move him to a different list - past-customers - so all the information that was related to that customer will remain so. In short, I want to remove from the customer-list without affecting the related data.

View 4 Replies View Related

Best Ways To Store Data

Apr 12, 2006

Hi
I am creating a contact management database.

I have set it up and now need to create an invoice section. An invoice needs to be issued every month and is worked out on a percentage of works complete. For example in one job there may be 10 items of work and for 8 of these iems 25% of the work is complete and the other 2 no work has started.
Therefore my invoice needs to be able to calculate 25% of the value of the 8 items and work out a total price to be invoiced. Each time an invoice is created I need to be able to store the invoice value and the percent value of each item complete.
Does any one have any ideas as to a good way of doing this. That is if you can undersatnd what I am asking for. Thanks for any help.

View 2 Replies View Related

Where To Store Misc. Data?

Jun 30, 2005

I have a handful of misc. data that is unique an really doesn't fit anywhere... I need it to be easily updateable, as it will and needs to change from time to time, What should I do with it?

Some of the data is a "Common Footer" that prints on ALL reports and DOES change periodically. I decided to create a common footer table with a single value and can access it from all of my reports... it works great!

However, I now have a bunch of other misc. data that I need to store, like the "Working Year" (I am going to use the field to dictate which year of info to pull the data from) "Common Header", etc. Additionally, I am considering storing formatting data such as font size (still considering this).

So with all this explained, to sum it all up, what is the best method for handling all of this misc. data? I didn't think creating a separate table for each piece was the best idea.

Thanks for your suggestions!

View 1 Replies View Related

Default Data Store

Dec 8, 2006

I created a report database that rely's on both default data and user entered data. Unfortunately the default data is going to be different for each office and needs to be easily updated as needed. So I created a "default data table" and named it DefaultData_tbl; and has these field names in it:

Office
Phone
Address
Fax

The personnel Main form is run from the Main_tbl with the exception of the items above (which reside on the DefaultData_tbl). This default data then needs to be automatically applied into the Main_tbl, via the Main form, which has Main_tbl as it's data source. Then the user does not have to keep filling in these textboxes for each personnel entry (unless it is different for a particular reason; which they should be able to change as needed and then automatically revert back to the DefaultData_tbl for any future personnel inputs). A personnel report (to file in their personnel records) is printed and will also need to pull from this table the items listed above (unless it is changed by the user for that one person they were entering in). The report name is NIPRNet_rpt.

For instance:
Say the Office is "Marketing"...
Everywhere on the reports, tables and forms that asks for the office should automatically put "Marketing" in the spot.
Now, if I get someone who is working in Recieving today, I should be able to update those office boxes with "Receiving" (just this one time) which will also have to be updated on the Main_tbl and NIPRNet_rpt (but should NOT update the DefaultData_tbl).
Then it should automatically revert back to "Marketing" when I pull up a new user

Putting this information in the default data under properties works fine, but I am sending this out to all the offices and want them to be able to easily enter in their particular default data. I don't want to have to create 30 databases all with default data set in them already. Plus, if something changes, like their phone number, I want them to be able to update this in their default data form and it be updated for future use.

I tried putting this in the Office textbox on the Entry Form:
=[Tables]![DefaultData_tbl]![Office]
All I get in the textbox is "Name?"

I would make it a Label instead of a Textbox to associate it, but the user has to have the ability to easily change this default data inside the form as they are filling it out. This updated data is also needed to update the Main_tbl and the NIPRNet_rpt.

I am racking my brain trying to figure out what I am missing here. The DefaultData_tbl will not have more than one record in it; as all it is doing is storing the "initial setup" default data to be used in reports and forms. Anybody know what else I can try to get this to work?

View 1 Replies View Related

Store Data From Query In Memory

Mar 11, 2006

Sorry if this is an elementary question, but here goes.

What I want to do is have Access run a query based on the user name "taken from a login screen". That query will return some values such as what team the Supervisor is responsible for, what days off his team has etc...

This information will be used to display all other queries that particular sup runs. When another sup signs in obviously the results will be different

And onto the problem

I have the query running and displaying the result in a datasheet view. I created this to see if the queries work. Now what I would like is to do away with this query (it pops up at startup) and have access save the user name in memory instead of running this query. I also need to figure out how to reference this "user name" piece of data, that will be in memory on the queries.

would appreciate any help you can give on this topic. I have been trying to solve this issue for a loooooong time.

thanks again,

Ricky

View 2 Replies View Related

Checkbox- Store Data In One Of 2 Fields

Jul 28, 2005

I would like to know if I can control what field the check box enters the -1 value in my record depending on a value from another field in that record.
In my table called workbook I have fields called, phone type which is a text field, wall and wm entry which are both yes/no fields. I want to put one check box on my form to check when a wall mount is needed for the device. The thing is there are two different wall mount sizes. So I need to check the phone type field on my form, if the value is ENTRY then I need to have it enter -1 in the WM Entry field. If the field anything other than ENTRY then the -1 value should go in the WALL field.
Can this be doen and how do I code it?

Thanks in advance

View 4 Replies View Related

Modules & VBA :: Use Default Value To Store Data

Apr 23, 2014

I'm trying to use a form to store some usefull data on my database.

I'm using the DefaultValue property of the TextBoxes in this code:

Code:
Sub Comando17_Click()
Testo4.DefaultValue = """sasso"""
Testo6.DefaultValue = """sdr"""
Testo0.DefaultValue = Testo0.Value
DoCmd.Save
End Sub

Comando17 is the name of the button to run the macro
Testo4, Testo6 and Testo0 are the names of my TextBoxes
sasso and sdr are the values I want to set as Default

When I run this macro it changes the DefaultValue property on VBA local variables and the Value property, but the DefaultValue on the form structure remains unchanged.

View 7 Replies View Related







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