Combo Box Row Source Problem
Mar 11, 2005
I have a form F_EXTRACT whose record source is a table named T_EXTRACT.
The form contains 2 controls, a Text Box named Surname and a Combo Box named Member_ID.
Column 1 of the combo box is bound to Member_ID (in the T_EXTRACT table).
Column Count is set to 3.
In Row Source, I have the following SQL statement:-
SELECT [T_MEMBER].[Member_ID], [T_MEMBER].[Surname], [T_MEMBER].[Initials]
FROM T_MEMBER
WHERE ((([T_MEMBER].[Surname])=[Forms]![F_EXTRACT]![Surname]))
ORDER BY [T_MEMBER].[Surname], [T_MEMBER].[Initials];
I wish to populate T_EXTRACT with selected Member_IDs but as the MEMBER_ID table contains many hundreds of records need to reduce the search through the display in the combo box.
The above method (by entering a surname in the Surname text box) works fine for the first entered surname but second and subsequent surname entries result in the details for the first entered surname being displayed in the combo box.
I've tried binding Surname to a field in the F_EXTRACT table but this makes no difference.
Any ideas would be much appreciated.
View Replies
ADVERTISEMENT
Mar 31, 2014
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done
2)If it can be done, how can I do it?
View 3 Replies
View Related
Apr 25, 2005
Hi all,
I have a form with a combo box on it and what I would like to do is when I click a command button, change the record source of the combo box from the query I currently have to a different one?
Is this possible,
Thanks for your time.
Taff.
View 8 Replies
View Related
Mar 13, 2005
Hiya! So, I have a form with a cascading combo-ish type solution. In actuality it's an option group that helps feed a combo-box. The option group, however, is unbound and the two choices represented in it span several choices elsewhere.
The field I'm reducing with a cascading solution is my [ExpenseCode]field. Each [ExpenseCode] is assigned one of 6 [ExpenseType]'s, numbered 0-6. Deductible expenses range from 1-4, non-deductible expenses cover 5, and 0 is used only by the system in the creation of dummy records and is unnecessary to the data-entry form. Using the [ExpenseType] directly would be confusing to the end user but is important to us during aggregation.
I am attempting to use an option group to simply select "Deductible" or "Non-Deductible" from the listed fields and have my combo-box update itself in kind.
The form is: frmExpenseLogsEntry
The option group is: optExpense1 (where Non-Deductible=1 and Deductible=2)
The combo-box in question is: cboExpense
The table with the combo-source is: lkupExpenseCode
The field I'm populating the combo-box with is: ExpenseCodeID
And the qualifying field is: ExpenseTypeID
The SQL I was using for my control source is as follows:
SELECT lkupExpenseCode.ExpenseCodeID,
FROM lkupExpenseCode
WHERE (((lkupExpenseCode.ExpenseTypeID)=IIf([Forms]![frmExpenseLogEntry]![optExpense1]=1,5,Between 1 and 4)));
but Access keeps changing it and erroring. I think I've figured it out enough to know that this type of statement won't work but I'm a bit stuck for an alternate idea.
Any help would be sincerely appreciated.
~Chad
View 2 Replies
View Related
Dec 21, 2014
I want to have a Combo Box on a form, that derives its values from a Table, but does not send selected values to another table. I want to use the value selected in the combo box in VBA code.I have set up a combo box, without a control source, and it shows the values in the drop down list but after I select one the box just goes empty. I expected that after selecting a value that value would be displayed in the combo box (and that would then become the value of the combo box that I could then use in code. I.e, CmdBox1.Value). If so, what do I need to do so that the value selected is displayed (and becomes the value of the combo box?).
View 2 Replies
View Related
Jan 5, 2013
I have a combobox containing the "Field Names" of a table called "Main" Also, I have a report called xyz which only has one field.
All I want, whatever field name user selects in the combo, report displays the results of selected field name only.
example
Main Table has three fields (Fie1, Fie2 and Fie3) The combo box lists the names of all three fields (Fie1 to Fie3) Report has a textbox in the detailed section.
I want user to select the field name from combo click button to generate the report (lets say if user selected Fie2) and want textbox to list all the records of Fie2
i tried [Forms]![Fm1]! [cm1] but it is listing the field names not the values in the field...
View 1 Replies
View Related
Jun 12, 2014
I have a combo box control in my form named PayDateID, but I told that control to DISPLAY the associated field PayDate.
I now am trying to make a separate control in the same form whose control source is the DISPLAYED PayDate, but it only wants to reference the underlying PayDateID.
How can I make the control source be the displayed value in that combo box?
View 1 Replies
View Related
Jul 18, 2005
I've designed a data entry form based on a table. I use a few combo boxes, (linked via SQL statements for their row/source) to fill most of the fields in the table.
What I want to do is populate one textbox on the form with the contents of a field in one of the combo box's row/source tables. The field I want isn't shown in the combo box.
Basically, what I want is that when I choose a PART NUMBER from a combo box, I want the OEM_ID from the same table to jump into the textbox below it.
I think I may have tied myself in knots though to the point where what I want can't be done. Any ideas? I know this is probably going to take a couple of goes at explaining. :P
View 11 Replies
View Related
Oct 10, 2012
i have a list box with 6 columns. in column 6 there is a time field. on selecting this list box i want to set the value of a combo box to the time field.
so in the control source i put
[Forms]![frmAppointmentTreatmentItems]![comboTreatmentDuration]![Column](5)
This has no effect. I am not sure if i have done this correctly. but the combo box has manual values in it. the reason i want to have values in it is so if the treatment is 45 minutes at default. But i want to change it to 30 minutes just for a single occasion then i thought that this would be the way to do it.
View 11 Replies
View Related
Aug 22, 2014
I am programming a database for a reorganized group in my office. For whatever reason they want their correspondence letters within the Database instead of in Word templates. This way I can standardize their headings and automatically import data from their tables onto their letters.
For this reason I chose a form. I felt using a report wouldn't give them enough editing power. Almost all of the fields on this form are unbound and set to default values. I want to use a combo box so the worker can select the "letter type" they want from the drop down and it will automatically update the body of the letter with the standard format of that type of letter.
Just one problem--these letters are wordy, so the "content" field had to be a memo. I know you can't set memo fields to combo box columns, so I'm in a jam.
how I could populate this memo field into the unbound field using some kind of selector? It doesn't necessarily have to be a combo box.
I want to populate the memo field into the unbound box, but I don't want it to establish a link or control source because I don't want the worker modifying the original record (think of it as a template).
View 11 Replies
View Related
Dec 31, 2013
I have a set of cascading combo boxes. When a value is selected in Cat 1 ID, it narrows down the selections in Cat 2 ID which narrows down the selections in Cat 3 ID.
However, the values don't show up for columns Cat 2 ID or Cat 3 ID until I enter the row. Then I have it set to requery the fields because the underlying data isn't populated. But then when I leave the row, the values go away.
Why doesn't it show the underlying value from the table? Each column is bound to a field in a table - I would assume that the recorded value would show up. Did I miss something easy?
I've attached a picture of exactly what I mean.
View 2 Replies
View Related
Sep 19, 2005
I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.
I'm trying to do a
Me.PollingPlacesResults.Form.RecordSource = ""
Me!PollingPlacesResults!PollID.ControlSource = ""
but this does not seem to work in actualy removeing the record source and control source.
View 14 Replies
View Related
Mar 29, 2006
Hi all,
I am using a combo box in my form and its row source is set to Table A, however, the data in the combo box arent displayed in alphabetical order even though the data from Table A is sorted in ascending order.
can pls help me by teaching me How to display "row source" in combo box in alphabetical order??
thks alot
FT:)
View 3 Replies
View Related
Dec 9, 2006
Hey
I have two list box.
the first box give the names of states.
The secound box uses the state name from box one. Then displays all colleges within that state.
This is an event. I am trying to get a grasp on the difference bettween DAO and ADO before coding.
At this point I like to know how to set the row source of the secound list box choice.
If you have the time to provide the compleet VBA; I will enjoy it.
Thanks a bunch
tom
View 2 Replies
View Related
Jul 5, 2005
Hi all,
I've got a form in my database that enables you to print or view reports, which I inherited. There is a list box that is automatically populated with all of the reports listed in the Reports tab of the database window. The list box row source says the following:
SELECT msysobjects.Name FROM msysobjects WHERE (((msysobjects.Type)= 32764));
However, I have been asked to create an identical report list that only shows some reports from the database window.
Does anybody know how I could modify the above code to only get reports beginning frm_id for example?
Many thanks
View 8 Replies
View Related
Mar 14, 2006
Hi, i'm having troubles using the wizard to enable me to insert fields all in one form.
I was wondering if anyone know a source code so when i start a new form from scratch, no wizard to help me. That I can use the event procedure to enable me to look up the source or the Control Source using the text field box
Thanks
View 1 Replies
View Related
Feb 20, 2005
I have a form bound to a query.
I have command button to open the form but I want to change the query bound to it when it opens.
I've tried changing the row source etc in an event... No luck.
Any ideas??
View 1 Replies
View Related
Jul 27, 2005
Hi all, at the moment all of my field are control sourced. I heard there is a way whereby the field could be unbound and one button it the control source for them all. Im not entirely sure what this means or how to go about it. But i think it would solve the problem of if my users start entering data into a record and then decide to leave it, this record is automatically added to the table, with little or no data. As the data in the table is used for statistics, the table showing records which are not actually there is causing problems. Im not sure if i explained this well, but i would be grateful of any help. Thanx
View 1 Replies
View Related
Sep 13, 2005
I have a subform listing items for purchase. Some are services and are not taxable, some are products and are taxable.
So far, I am calculating the sales tax for each record (item paid for), based on whether the thing is taxable or not and putting that result in a text box (txtSales_Tax) on the form. Since these calculated amounts aren't stored in a field, I can't SUM them, since SUM only works on data in table fields. Can someone tell me how to get a total?
Otherwise, I'll get rid of txtSales_Tax entirely, if someone can tell me how to write a SUM function, as a Control Source, that includes an IIf, or a WHERE, so it only adds items where the yes/no field Taxable=True.
I've got an IIf with a SUM function in it but, even in the footer, that only works for the current record. I need a SUM that has a nested IIf or WHERE in order to include all the records.
View 1 Replies
View Related
Mar 30, 2008
I have a drop down list of Last name and first name.
I want this to be the only unlocked feature on the page. When a name is selected the other information is shown (the persons cc#, Exp date, phone number, email etc.)
I am almost sure its a control source, but i'm not 100% as i'm relatively new to Access..
Another issue I would like to know is how to show the Last Name, First Name in the selected drop down after its selected, currently its only showing the Last name.
Thanks in advance
View 4 Replies
View Related
Oct 24, 2004
I have a form with several drop dpwn lists in it. I want the choice of each on to narrow the choices of the next drop down list.
I have see a few examples on this site on how this is done but at this point I dont understand how to write the information. I have taken what another person had posted and dont really get what to do next. Do I paste the info in the rowsource box and then build the query? The example I saw had expr1 and expr2 in the querys so I was lost.
Thanks, Joe
1st drop down list row source
SELECT DISTINCTROW tblProjects.ProjectID, tblProject.Poject FROM tblProjects ORDER BY tblProjects.Project;
2nd drop down list row source
SELECT DISTINCTROW tblLocations.LocationID, tblLocations.Location FROM tblLocations WHERE (((tblLocations.ProjectID)=[Forms]![frmMain]![cboProjects])) ORDER BY tblLocations.Location;
View 14 Replies
View Related
Jul 14, 2005
In my contacts datababse I have a main table where all the is stored for my contacts.
I have a form that I use to enter and display the information from, Because I have more the one contact at a given company I have created a seperate table that contains all of the contact details for each office.
What I would like to be able to do is when I select a office on my form Access will populate the the rest of the fields in this section with the relevant information.
How do you do this?
View 2 Replies
View Related
Feb 13, 2008
Hi!
I have those (simplified) tables that are linked with an n:m relation
persons:
#ID#FullName#
trainings:
#ID#startDate#
training_members:
#ID#trainingID#personID
Now I created a form to fill the training_members table with the participants. For the form I'm using a dropdown list filled with the names of the people from the persons table. What I now want is that the dropdown list only shows the values that are not already used before. So I changed the SQL statement of the row source property:
SELECT persons.ID, persons.FullName FROM persons WHERE persons.ID Not In (SELECT personID from training_members inner join trainings on training_members.trainingID = trainingsn.ID) ORDER BY persons.FullName;
I also added "me.recalc" to the after_update event of the dropdown list.
It does work - but there's one problem left: The SQL query doesn't include the just selected value. Because only values that are included in the list are accepted, the name of the person isn't shown in the dropdown.
Do you know how I can update the SQL statement so that the just selected entry is as well mentioned in the list? The abovementioned form is displayed as "Continuous Forms", so I don't know if it is possible to access the recordset the dropdowns are located into...
Thank you in advance!
View 1 Replies
View Related
Apr 1, 2005
is it possible to change the control source of an unbound text box ?
For example i have a textbox which simply displays the number of current records displayed i.e. =DCount("*", "queryname")
Now i wanted that with the click of a button (or something), i wanted to change it's controlsource to =DCount("*", "queryname2") ... however, as a result i got #name instead of the correct count.
Thanks
View 5 Replies
View Related
May 8, 2005
Can I build a form without it having a table or query. All unbound controls?
If so how would I preform a OnClick event to populate a combo box using code from one of my tables? Then have the form lookup the values that belong to the value in the combo box after I make a selection?
View 2 Replies
View Related
Jul 14, 2005
I have created a new field in a Form and named the Control Source "Active". However, when I vew in Form View there is a "0" in the field and it also does not allow me to type anything in the field.
Any help would be greatly appreciated.
View 3 Replies
View Related