Combo Box - Populate List Options Based On Data Already Entered

Microsoft Access 2003

Novice and working on a project with deadline... please help.


I have a table w a field that I want to convert into a combo bo and use data in the field as the options:


FIELD: Student Status


OPTIONS:
Enrolled
Suspended
Withdrawn


How do I get the combo box to automatically pull the values from that field into the options in the field when u pull down the drop down box?

Am I being clear?

View Replies


ADVERTISEMENT

List Options Based On Other Fields

Hi,

I've been using this forum for a couple of weeks but this is my first post, so apologies if I've put it in the wrong place!! I have a table with some drop-down lists to fill certain fields, and I would the available list options to change based on information in other fields. To provide an example:

Field One: The drop down list lets the user choose "Alphabet" or "Number"

Field Two: The drop down list lets the user choose A-Z if "Alphabet" is selected in Field One or 1-100 if "Number" is selected in Field One

Hope I've been clear enough. Any help is greatly appreciated!!

Cheers,

Matt

View Replies View Related

Automatically Populate A Date Field Based On Value Entered In Another Field

I need to create a New Form control for this situation:

If I enter a date into a field and the choice for another field is equal to a certain value. How can I get the date I entered to be automatically populated into another date field.

For example:

If I enter 11/10/2005 in a date field and I choose either "BN", "BA", or "BT" in a text field, I need that date of 11/10/2005 to be automatically populated in another date field on the same form.

Any help is greatly appreciated.

View Replies View Related

Auto-Populate A Field Based On List Box Selection - Version: 2002 (10.0) XP

Hi everyone!
I apologize in advance because I know this question has been asked on here before. However, I've read through many of them and tried the suggestions, but can't get my project to work. Here is what I have set up and what I'm trying to do. I one table with two columns - Point of Contact and Department. In another table, I have a field titled Point of Contact that is a list box based of the previous table. (Well, technically based off a query that just alphabetizes the names). Also in the second table is a field titled Department. I would like that when a name is selected from the Point of Contact drop down box in the second table, the Department field is auto-filled based on the corresponding entry in the first table. Does that make sense?

I also have a very similar situation, where i have a table set up with ID numbers and corresponding descriptions, and I would like it that when a number is selected from the dropdown, the description is auto populated. However, I'm thinking that when I get the first one figured out, all the logic should be the same for this.

Any help is appreciated, and I thank everyone in advance for taking the time to help. Please keep in mind that I'm a VERY basic Access user.

Thank you!!!!

View Replies View Related

Automatic Values Based On Entered Data

Hi all,
Please bear with me if I'm asking a dumb question. I've been tasked to create a database from scratch and I've not had much experience working with Access.

**My Question**
Using a form is it possible to have the form automatically enter a "value" in one field based on the information inputed by someone in a different field.
ie. When some one puts in a value between 0 and 20 in one field it automatically enters a 1 in the other, and when some one puts in a value between 21 and 30 you get a 2 and so on down the line.

Thanks for the help.
Cheers

View Replies View Related

Pulling Data From Other Tables Based On Values Entered

I'm attempting to build a simple database for a martial arts tournament registration. The weight division (Fin, Fly, Heavy, etc.) depends on the age, the sex and the weight. I've tried this several different ways, most recently by using one table called "competitors" with all the entrant's information, and several other tables based on the age class/sex (i.e. I have a table called Age 8-9 Male with the weights and divisions in it, and other tables for the other ages/sex).
So, basically, what I'd like to have happen is a report that will lookup in the correct table the division, based on the weight entered. In other words, for a record where the age is 8-9 and the sex is Male, the report compares the weight to the values in the 8-9 Male table, or if the record is a 12-13 Female, it looks in the 12-13 Female table for the weight, and places the correct division in the Division field of the report.
Probably going about this wrong.....but any help would be appreciated.

View Replies View Related

Creating Reports Based On User-entered Data - Version: 2000 (9.0)

Hi there,

I'm very new to Access so please excuse me if this question is really basic.

I have a table of questions and answers for conducting customer interviews. Each record also has a Customers field and a Products field. I want the Interviewer to open a report and be asked to select one customer from a displayed list of customers, and one or more products from a displayed list of all products. Then the report will open, showing only the questions and answers relevant to that customer.

I hope this explanation makes sense. Can anyone give me some clues? I have been trying to work out how to do this for a while and I can't find anything in the help files.

Thanks in advance,
Aurora

View Replies View Related

How To Automatically Fill Fields In A Form Based On Data Entered - Version: 2003 (11.0)

I am trying to automatically fill a field in a form based on the year of the date entered in MM/DD/YYYY format. The year entered is used to access a row in different table than the form's RecordSource whose key field is intControlYear. Once the row is accessed I want to return the value of the intControlNumber field. I am trying to use the following code in an On Exit event of the Date Entered control. When it executes I get a run time error 2001 saying that I have cancelled the previous operation at the time it tries to execute the DLookup statement. What am I doing wrong;

Dim intYear As Integer
Dim varNumber as Variant

intYear =Year(datDateEntered)
varNumber = DLookup("intControlNumber", "tblYearControl", "intControlYear=[intYear]")
Me!intYearSeen.Value = varNumber

Thanks in advance for your help

View Replies View Related

How To Populate List Box With Self-customed Data

I have a listbox call lst with two columns, what I want to do is to populate this two column with "firstdata" and "seconddata" respectively.
What I do is:
Me.lst.RowSource = """firstdata""; ""seconddata"""

But I see nothing appear, what is the corect way to achieve in vba?

View Replies View Related

Populate Form And Subform With Data Based On Search ..

Hi,

I have a form with a subform, Both of them are based on a query.the form

displays a productid and its details ,and the subform has matching

productnames for that productid.

Now i have a search on the main form wherein the user enters ( search

for) the productid, once they click search button, the form should show

that particular prod id and details and subform loaded accordingly with

that productid matches...seems simple but how do i code this in VBA??

Basically populating the form and subform with data based on search..

i am using ODBC coonxn with backend oracle tables..

any help would be highly appreciated!

Thanks

View Replies View Related

Combo List Based On Current Record

I am designing a contact management system and have hit a bit of a wall. I am farily new to Access so please advise if I am going about this the totally wrong way.

I have three tables; Contacts, Companies, Company_Addresses

Contacts:
ContactID (P)
CompanyID
OfficeName

Companies:
CompanyID (P)

Company_Addresses:
CompanyID
OfficeName (P)

What I want is when adding a contact, to have a drop down list in the CompanyID field showing all the companies in the Companies table, and then in the OfficeName field, have a list of only the offices related to the company selected in the previous field.

I can do the first list, but cant work out how to list only data related to the company selected in the previous field. Any help would be greatly appreciated.

Sorry if this is in the wrong forum.

Thanks. James

View Replies View Related

Populate Form Based On Combo Box "On Change"

Hey all,

I'm new to Microsoft Access but I'm not new to programming. What I want to do is when the combo box triggers and On Change event, do the following:

SELECT user_email FROM user WHERE user_first LIKE '[COMBO BOX CHOICE]'

Then set the value of that query to the textbox called "reportedEmail". I know this is easy, but I can't seem to find a decent tutorial on it anywhere.

Suggestions?

Thanks,

- MT

View Replies View Related

Populate Field From Previously Entered Name

I have a form with a text box that the user enters their name into. When they click submit a menu form is opened. I want the name that was entered to be carried over to a field on the menu form. This will welcome the user, eg: WELCOME John Smith.

Im thinking that i should use the INSERT INTO function, but im not sure of how to go about it.

View Replies View Related

Combo Box List Based On Items Not In Subform - Version: 2000 (9.0)

Hello,

Hopefully this is a simple question!

I have a combo box that I am using to add items to a list in a subform. (List of people (subform) that own a particular item (Mainform))

I would like to have the list in the combo box just be those people that do not already own the item.

How do I limit the list in the combo box to those not in the other list?

Thanks!

View Replies View Related

Populate Option Group When Date Field Is Entered

I have a form where users fill in a date resolved and click complete in the Option Group, it's default value is incomplete. I have a problem with the users forgetting to change it to complete when the enter the date resolved. Is there a way to change the option group value when the date resolved is entered?

View Replies View Related

Populate Option Group When Date Field Is Entered

I have a form where users fill in a date resolved and click complete in the Option Group, it's default value is incomplete. I have a problem with the users forgetting to change it to complete when the enter the date resolved. Is there a way to change the option group value when the date resolved is entered?

--- OR ---

Can it notify the user that they need to change the Option Group?

View Replies View Related

Populating Combo Box Based On Data In Another Combo Box

Hi all!

It's been a while since I've used Access, and I seem to have forgotten this.

I have a form which allows entry of Borrower's details. I have 2 combo boxes on the form.

They are:

cboBorrName
cboLoanSN

Once the user selects the name from the cboBorrName, I want the cboLoanSN to display all loans associated with the Borrower so that they can select the correct loan and add repayment details accordingly.

I have added the following SQL statement as the record source of cboLoanSN

Code:SELECT * from tblBorrower WHERE tblBorrower.fldLoanSN=[Forms]![frmBorrower]![cboBorrName]

I have also added the following code in the After Update event of cboBorrName

Code:Me.cboLoanSN.Requery

However, it doesn't work.

Can someone please help me out?

Thanks a bunch!

View Replies View Related

Populate A Field On A Form Based On Data In Another Field. - Version: 2003 (11.0)

Hi, I'm very new at creating forms. I need a control to lookup a record in a table. I want my form to be able to lookup a Vendor ID number from a table based on what I select from a drop-down list of Vendor Names. I can't figure out how to use the Dlookup function, and that may not be the correct method anyway. I did create a combo box which includes my Vendor names, so the next control on my form I want to automatically populate with the Vendor ID number from the vendor table. Is this even possible?

Any help is very much appreciated. I'm just not very good at this yet!

View Replies View Related

List Data In Subfrom Based On Combobox

i just to know how to list the all data at subform that same thing that i selected at combobox..

ok for example..

i want to list all car part that purchased in nov 2005 at subform...
date(nov 2005) selected from combo box...
then if i change other date (ex: dec 2005) it update n view new parts..

is there need some coding at macros?

plz help me im new with access... :confused:

View Replies View Related

Populate A List Box With Table Names & Table Data

I have 2 questions/problems:

1. I want to populate a list box with all the Tables Names in my Database using VBA.

2. I also want to create another List Box or Grid (or any thing that will show table data) that when i have select a Table Name (See above (1)) it will show all the data in that table in the List Box. Was thinking some kind of SQL using vba to populate the list box?

Any ideas or help will be much appreciated

Richard

View Replies View Related

Combo Box To Add Data Items Based Upon Table

I have a small database, that I would like to use a combo box to allow user to select a value based upon values already entered on table, and then if value is not found enable the user to enter a new value that will then become part of the selection for future record adds.

View Replies View Related

Populate Excel Combo Box W/Access Data - Version: Any Version

This has been bugging me for a few hours now and I don't understand what the issue is. I have an excel sheet with a combo box on it that I want to populate with access data. Below is the code I am using that I found on the web, but I can't seem to get it to work. I always get a "Data type mismatch" error on the "application.transpose(vadata)" line.

Any ideas on how to accomplish this would be appreciated.

One note, the list of items to populate the combo box is fairly long (>2500 records), so the code should be as efficient as possible.

TIA

Sub Populate_Combobox_Recordset()
Dim cnt As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stDB As String, stConn As String, stSQL As String
Dim xlCalc As XlCalculation
Dim vaData As Variant
Dim k As Long

'In order to increase the performance.
With Application
xlCalc = .Calculation
.Calculation = xlCalculationManual
.EnableEvents = False
.ScreenUpdating = False
End With

'Instantiate the Connectionobject.
Set cnt = New ADODB.Connection

'Path to and the name of the database.
stDB = ThisWorkbook.Path & "" & "Wetland_Plants_List1.mdb"

'Create the connectionstring.
stConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & stDB & ";"

'Create the SQL-statement.
stSQL = "SELECT * FROM tbl_Plant"

With cnt
.CursorLocation = adUseClient 'Necesary for creating disconnected recordset.
.Open stConn 'Open connection.
'Instantiate the Recordsetobject and execute the SQL-state.
Set rst = .Execute(stSQL)
End With

With rst
Set .ActiveConnection = Nothing 'Disconnect the recordset.
k = .Fields.Count
'Populate the array with the whole recordset.
vaData = .GetRows
End With

'Close the connection.
cnt.Close

'Manipulate the Combobox's properties and show the form.
' With frmData
With Sheet1.ComboBox1
.Clear
.BoundColumn = k
.List = Application.Transpose(vaData)
.ListIndex = -1
End With
' .Show vbModeless
'End With

'Restore the settings.
With Application
.Calculation = xlCalc
.EnableEvents = True
.ScreenUpdating = True
End With

'Release objects from memory.
Set rst = Nothing
Set cnt = Nothing
End Sub

View Replies View Related

Limiting Combo Box Data In A Subform Based On A Value In The Mai - Version: 2003 (11.0)

I am trying to only limit the amount of data in a combo box in a subform based on a value in the main form. The field in the main form is machine_type. After the user updates machine_type in the main form, then the available parts are only shown in the combobox in the subform. This is done using VBA on the afterupdate event.

This no longer works if the user moves through the records using the record navigation buttons and does not update this field. On what event do I need to act to have my VBA code limit the combobox in the subform, once a new record is displayed but the machine_type value is not updated by the user?


I am pretty sure this is possible, I just have found no solution yet, and was hoping someone here could help.

Thanks

View Replies View Related

Combo Box That Displays Data Based On Another Combox - Version: 2002 (10.0) XP

Hey all,

Having a problem and need some help.
I have a combo box called : cbo_model
It displays 2 columns, model and channels
The 3 channels that will be entered in for the channels field are 32,128,160

I have another combobox called cmb_c1
This displays a list from a different table than above called CPL_160. This lists radio locations , channel descriptions ,etc.

What I need this to do is set the rowsource for cmb_c1 based on the channel number from cbo_model.

Any help would be much appreciated.

Chuck Theobald

View Replies View Related

Combo Box Based On Query Based On Another Combo Box - Version: 2007 (12.0)

I'm having real problems trying to get my database to work.



I'll start from the beginning.



tblJobs(JobID, EngineerID, EquipmentID,VehicleID,Date,Time,etc etc) (these are all primary keys to make one composite key)

tblEngineer(EngineerID,EngineerInitials,Active) (EngineerID is primary)

tblEquipment

tblVehicle



I am trying to create a form to book an engineer, equipment and vehicle out for a job. I managed to get the form working fine but it now has stopped working.



I created an unmatched query that would find all engineers which weren't already booked out on a job and were active based on the time and date. This query works fine if I run the query and type in a date and time, it will only show engineers which aren't booked and are active. This is called qryFindFreeActiveEngineers



So, I created the form frmCreateJob. This has a DTPicker, varDate,varTime,cmbEnigneer. varTime has its control source set to the value of the DTPicker.

cmbEngineer is based on the unmacthed query qryFindFreeActiveEngineers.

I then went into the VB editor and told it:



Private Sub varDate_AfterUpdate()

cmbEngineer.requery

End Sub



and did the same for varTime and the same for the DTPicker so that var Date would update.



When I pick a date and time the cmbEngineer combo box doesn't list the correct values, it just lists all engineers except the ones that are not active.



What is going wrong with this because as far as I can tell it should all work. I think I might be using the wrong event, but I've tried a load of others and none of them work.



Sorry for the long post,



Thanks in advance for any help.



P.S

I'm using both 2007 and 2003 but the database is in 2000 format.

Edited by: Cerberus90 on Sat Mar 8 11:51:51 EST 2008.

View Replies View Related

Excel Values Entered Then Values Populate In Access Table - Version: 2007 (12.0)

I currently have a spreadsheet that when I enter data in Excel, am I able to create a Table where the info in Excel will populate in the Access Table? If so, how do I go about doing that. I can do it in Excel, but I am trying to avoid adding all these formulas and locking the cells.

Thanks,

dchantha

View Replies View Related

Field Updates Based On Month Entered

I have a report were I want to enter a month say "November" and I have 31 independent fields that reflect each day of that precise month. I also need the the last day of the month to only show the actual end date. 28, 29, 30, or 31 respectivly.

View Replies View Related

Displaying Data From Combo And Text Boxes In A Single List

I have several combo boxes and textboxes showing quanity,productname,
size, and price. How can I pass all of this info in a single row that also calculates
the quanity and price. Also, multiple selections can be added, so several items can
can added in other rows. THe ability to cancel each row would be required as well.
Thanks

View Replies View Related

How To Run A Report Based On User's Options

Hello,

I need help with something (i attached a database).
I need to run a report based on user's options so i created a form. There are two comboboxes and 2 checkboxes on the form. If the checkbox is checked i want to consider the choice of the user on the particular combobox. If no, to ignore that column.
The second problem is when the user choose "no choice" i want the query to run for all choices without filtering the combobox.

Any suggestions?

Thank you in advance.

View Replies View Related

Change Control Colour Based Upon Value Entered - Version: 2000 (9.0)

Hi, I am seeking a way of solving the following problem.

How do I change the value of a control, based on the value entered? (MS Access help says; I should go to the Developers Solutions Database). That is, if the user enters an incorrect value into a field or control, how to I write some code to make the control go from a background of white to a background colour of red ?

I think this may be something to do with the "Iif" command.

If anyone can help, may I thank you in advance for your help.

Kindest Regards
David Roper

View Replies View Related

Error - The Text You Entered Isn't An Item In The List - Version: 2000 (9.0)

I use a combo box to allow the user to select and goto a record in my database. It is very useful for them to either scroll down the list or simply type the first few letters. The problem is if they mistype the letters and no records are highlighted, when they click on any other control on the, main form the combo generated the error - The text you entered isn't an item in the list. all the user can do is press escape or choose an alternative record to goto. What I would like to happen is nothing, that is if a user doesn't make a selection from the combo, the combo simply stays where it is.

Is there any way I can handle this error?

Thanks for your help

Shane

View Replies View Related

Custom Report Based On Info Entered In A Form - Version: 2003 (11.0)

I'm working a summer internship at a machine shop this summer, and one of my tasks is to build a database that allows the employees in the tool crib, and the employees in engineering to add tooling assemblies, new tools, new extensions, etc..

I chose to use a database even though i have never used access before because i know all that data would just get ugly and intimidating in excel

I have the basic database up and running, which allows users to add in new tools, holders, extensions etc.. through the use of forms. I also have a report set up that prints out ALL of the assemblies in the database (assemblies being compilations of one "holder," one "extension" and one "tool").

Now, the question is if i want to print out a report that only contains, say, assemblies 1, 5, and 10, but dont want to constantly create and format a report with the wizard each time i need to make a new assembly sheet for each part, can i make a form, enter which assemblies i need (you can assume there is a constant number of assemblies per part - in reality there isnt, but ill cross that bridge when i get there), maybe a part number and a few other random pieces of data and have access automatically generate a report for me?

keep in mind i'm only familiar with the very basics of access (i just dont know where to look to create this). I'm not opposed to using some VBA script as i can do some elementary basic code, but i dont know all the commands i would need to use.


from reading this over before i post it, this seems like it would be a pretty common request. If anyone knows of a guide that outlines how to do this that would be greatly appreciated as well.

Thanks,
an intern in over his head

View Replies View Related

Filling Textboxes Based On Whats Entered In A Textbox - Version: 2003 (11.0)

Hello all,
I have several textboxes that fill based on what I enter into one textbox (Ill call this the Tnumber textbox), I put the code behind the on exit event property of the Tnumber Textbox and it works fine, when I tab to next textbox all the textboxes fill with the correct information,BUT!!!, if I go back and change the Tnumber textbox the textboxes keep the data from the original Tnumber entry, Im not sure how to go about solving this, Any ideas, Thanks in advance, below is the code I used

Private Sub TxttNum_Exit(Cancel As Integer)
Dim TableName As String
Dim dbname As String
dbname = "c:studentswithdisabilities"
Dim ChangeCount As Long
TableName = "InputStudent"
ChangeCount = 0

Dim CustDB As Database, CustTable As Recordset
Set CustDB = DBEngine.Workspaces(0).OpenDatabase(dbname)
Set CustTable = CustDB.OpenRecordset(TableName, dbOpenTable)
Do Until CustTable.EOF
If CustTable![Tnumber] = Forms!InputStudent!Txttnum Then
Me.TxtAgr.Value = CustTable![AgressoID]
Me.TxtStu.Value = CustTable![First Name]
Me.Text124.Value = CustTable![Surname]
Me.TxtAdd.Value = CustTable![Address]
Me.TxtTown.Value = CustTable![Town]
Me.Text122.Value = CustTable![Country]
Me.TxtCourse.Value = CustTable![Course]
Me.Text127.Value = CustTable![Year of Entry]

ChangeCount = ChangeCount + 1
Else
End If
CustTable.MoveNext
Loop
End Sub

View Replies View Related







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