Updating A Combo Box

Nov 9, 2006

Hi,

Can anybody help me please, i suspect that this problem has a simple answer but a search on the forum didn't really answer it.

I have developed a Database for my brother who runs his own business. Within this database he has a number of Tables including one for maintaining / recording his clients details i.e. Company Name, Point of Contact, Telephone number etc etc. and all this information is recorded via a form.

Part of this database is to produce and record details of estimates, invoices, VAT charges etc. In order to generate a new Invoice or Estimate, i have created another form which has a Combo box on it linked to the Customers Table to allow the invoice or estimate to be created for that customer - still with me?

My problem is this - if i add a new customer, their details do not appear in the combo box on the create invoice / estimate form unless i close the database and then restart it. How do i make the combo box include the new customer details without having to close / reopen the database?

I have played around with requery but with no joy. The database works fine but this last simple(?) problem is bugging me.

Any help / advice greatly welcome and appreciated.

Alan

View Replies


ADVERTISEMENT

Updating Combo Box Contents Dependant On Other Combo Box

Nov 15, 2004

I have created a database that is used to track various programs that our organisation runs, and keeps a record of which Division the program is in.

at the moment I have a main form which has a combo box that lists Divisions, then I have a subform that has a combo box on it that lists the purchasers.

what I would like to do, is to have the Purchasers list update when a Division is selected in that main form, as depending on which Division is chosen the contents of the Purchasers list changes drastically.

Is anyone able to offer some assistance?

View 1 Replies View Related

Updating Combo Box Value Based On Another Combo Box Value

Aug 7, 2014

I have a table in which I have following fields:- RegionCountryVendorName

I want to create a form which will filter the data based on selection in previous form. (I dont want user to make any changes on the form i.e. Add,Edit or Delete) Hence i have kept all the fields on the form as "unbound".In my form I have CboRegion , CboCountry...For CboRegion i have created a select query which will filter data and shows me unique value. This part is working absolutely fine.

For CboCountry i have created parameter query based on selection made by user in CboRegion. The query name is QrySelectCountry which is showing under Row Source property.When i run the form and i select item in CboRegion the data in CboCountry is popping up correctly, but when i change the value in CboRegion the data is not updating in CboCountry. (If i hit F5 it is working fine but not updating automatically).

I tried afterupdate and change event of CboRegion by putting Me.Cbocountry.Requery or DoCmd.OpenQuery "QrySelectCountry" but still the data in CBoCountry is not updating.what needs to be done so that my fields will pop up data automatically.

View 4 Replies View Related

Updating My Combo Options

Jan 4, 2006

I just added a column to my table upon which a cascading combo box is built. When a name is selected from the combo box, 2 related fields populate. I want it now to populate a 3rd field. So I added the column to the table to input the data into that 3rd field, and adjusted the column widths and count in the combo box. However, when I indicate the control source of the 3rd field as the corresponding new column from the combo box, nothing populates in my 3rd field. I've tested it by designating one of the previuosly exisiting combo box columns and it will populate the data, but it seems to not be recognising my new column. I've also verified the properties of the new field to ensure that it is visible. What went wrong?

View 3 Replies View Related

Error With Updating Combo Box

Sep 7, 2006

Hi,

I have a form with various fields, some of which are normal data entry fields, others dynamically updating combo boxes.

My first field is a date field which defaults to today's date, the field following this is a growing combo box which requires some narrative to be entered. I have set up this combo box so as when data is entered into the combo box, the combo box will store it, allowing that entry to be used again. I achieve this with the Got Focus property Me.Refresh.

An error occurs when the user wishes to change the date from the default to another date. When I tab to the narrative field, Access informs me that the error occurs with the Me.Refresh property of the narrative field. I want to keep this property to allow me to update the combo box entries but I can't keep allowing this error to occur.

Does anyone know how I could solve this problem/get around it?

Thanks
Turbojohn

View 11 Replies View Related

Combo Box Updating A List Box

Dec 8, 2006

Hello,

I'm a beginner in the Access world.. had a two day crash course.

I am trying to populate my list box when I make a select in my combo box.

eg: Combo box-select vendor, which then would populate my Product Name box.

Can someone take a look at this datebase and give me some advice? I don't have a huge understanding of code..so please bare with me.

Thanks
:o

View 5 Replies View Related

Updating A Combo Box RowSource

Sep 30, 2005

I have a form that has both a Make and Model field and I am trying to set it up so that when the Make is selected or changed the Model Query filter updates.

I have read other threads regarding this matter but am still unable to get it to work. The Form pulls from one table (tblPCInfo) while the query pulls form another (tlkpProductsServer). Also the cmoMake ComboBox pulls from table (tlkpProductsCategoryServer)

Model Query:
SELECT tlkpProductsServer.ProductID, tlkpProductsServer.ProductName, tlkpProductsServer.ProductCategoryID
FROM tlkpProductsServer
ORDER BY tlkpProductsServer.ProductName;

I want to add a WHERE parameter to filter for the current ProductCategoryID which comes from what is selected in the Make Combo Box

Code I have Tried:
Private Sub cmoMake_AfterUpdate()
Dim strRowSource As String
strRowSource = "SELECT qry_Model.ProductName FROM qry_Model WHERE qry_Model.ProductCategoryID=frm_frmPCInfo.cmoMake"
Me.cmoModel.RowSource = strRowSource
End Sub

I am not sure if this is enough info to go with and I just started learning VBA so I know this is probably a mess.

View 8 Replies View Related

Updating One Combo Box From Another Using Select Query

Mar 27, 2007

I am trying to make a combo box that is controlled by the value in a previous combo box. The first combo box lists genres for games (e.g. RPG, Sports, Action) and the second, when necessary, will expand on this. For example, if Sports is selected in the first, the second would display a list of sports (Football, Hockey etc.).

The following items from my database are relevant to this question:

tblGames
GameGenre
GameSubGenre
tblGenres
Genre
tblSubgenres
Subgenre
SubgenreGenre
qrySubgenres

tblGames uses a lookup wizard to assign the tblGenres list to the GameSubGenre field. Also, tblSubgenres uses a lookup wizard to get the value for SubGenreGenre from tblGenres.

I built the following select query using the expression builder:

SELECT tblSubgenres.Subgenre, tblSubgenres.SubgenreGenre
FROM tblSubgenres
WHERE (([SubgenreGenre]=Games!GameGenre));

When I run the query, it asks me to enter a value for Games!GameGenre. If I enter a correct value, it lists just the sub-items I want. However, if I set GameSubGenre in tblGames as a combo box that looks up from qrySubgenres, the combo box will remain blank always.

What should I do to get this working properly?

Thanks in advance for any assistance!

View 6 Replies View Related

Combo Box Updating By Selected Record

Feb 24, 2006

Hi all,

I have created a form to enter downtime information using the fields from downtime table (as follows)

tblDowntimes

fldDowntimeID (PK)
DateOccured
MaterialCode
ShiftID (FK)
LineMachineID (FK)
DTCategoryID (FK)
DTReasonID (FK)

However on the form, LineMachine is taken from the tblLineMachine where LineID and MachineID are FKs. This has a large list of machines as one line can have many machines and a machine may appear on more than one line

So on the form, i would like to select the LineMachineID by inserting fldLineID (which would be a combo box) where the user could select which line e.g. Line1 and then the combo box for the LineMachineID would only display the relevant machines for the entered line instead of all the machines for every line.

I managed to achieve this,but I am experiencing a problem where if, in the Line combo box, i choose a different Line e.g. Line2, the LineMachineID does not then display the machines on Line2, but keeps showing the machines for the line I originally selected (Line 1).

How do I get the LineMachineID combo box to update every time a different line is chosen in the LineID combo box?

Any assistance much appreciated!!

thanx all,

Keji

View 3 Replies View Related

Updating New Item Into A Combo Box List

Aug 24, 2006

Hi,

I am using a combo box in my form. It is a growing combo box allowing new entries to be entered to create a growing list.

When new entries are made to the combo box list they are only displayed when I quit the form and then return to it. Is there any way I could allow the combo box list to grow dynamically rather than having to get the user to quit the form and then return to it?

Many Thanks
Turbojohn

View 6 Replies View Related

Updating Table Data Using A Combo Box

Sep 4, 2006

Hi all
I have been nutting out this problem but have been unable to find a solution, even my learned colleague is at a loss to help. This is an data update query using combo boxes and forms.
I have 2 databases, Data and App, I have linked 2 tables, Main and Supervisor from the Data.mdb to the App.mdb. Supervisor has 2 fields ID and Name. Main has multiple fields but is linked to Supervisor by the ID field. I have a query that gets details from the Main Table and this is entered into a form. I deleted the SupervisorID text box and inserted a combo box using the wizard, it gets its data from a query that gets details from the Supervisor table showing the Supervisor name, the ID field in the dropdown is hidden. The combo box selection is held in the SupervisorID of the Main table.
What I want to do is change the Supervisor name using the combo box however I am unable to select another name from the dropdown list.
I have tried changing the Data Entry property of the form to Yes, this did not work. Allow edits is set to yes. I have tried adding another combo box which gets the data straight from the Supervisor table but I have the same problem.
Can anyone help, we think it is a simple property setting but all we have tried has failed to date. Thanks in advance.
Craig

View 4 Replies View Related

Updating Another Field Upon A Selection From A Combo Box

Feb 28, 2008

Hi,

Im trying to get one of combo boxes to update a field automatically.. There are two choices in this combo box "Gatwick" and "Woking" what i need is when one is selected the JobNo field will update itself to GWO-(the first Unused JobNo) Ive used some VBA to make atleast the GWO- or WWO- appear and it works, but i have no clue as to how to get the next unused order number to appear after it.

This is what i have so far:

Private Sub JobLocation_AfterUpdate()

If Me.JobLocation = "Gatwick" Then

Me.JobNo = "GW0-"
Else
Me.JobNo = "WWO-"
End If

End Sub

Any help would be greatly appreciated.

Cheers

Marc.

View 4 Replies View Related

Updating Table From A Combo Box Entry

Oct 22, 2007

I am learning access on my own, so please bear with me.
I am using Access 2000.
I have a form with a combo box. I use this form to enter data into the database. The combo box selections are from a separate table. If the required entry is not in the drop down menu selections from the table, the user needs to type in the proper selection. If this happens I want the table driving the combo box dropdown to be automatically updated with the new entry so that the data will appear in the drop down menu selections the next time. How is the best way of accomplishing this. Thanks for any answers and examples.

View 4 Replies View Related

Updating Entries In Combo Boxes

Jan 26, 2015

I have two tables and their associated forms. Agent Firm and Agent Person. I have created a one (Agent Firm) to many (Agent Person) relationship because a Firm can have many Persons (not vice versa).

I have also created a combo box autofill so that some of the information from the Agent Firm can be posted on the Agent Person.

Query one: I tried using text for the AutoFirm ID because each firm's name is unique. However, when I tried to see what happened if the firm changed its name, still having a unique value, I was not allowed to. Why? and can I over-rule this? For the time being I have used an autonumber as an ID, but I feel that is inefficient.

Query two: I have set up a combo-box, which works, using the following:

Private Sub cboAgentFirmID_Change()
Me.txtAddress1.Value = Me.cboAgentFirmID.Column(2)
Me.txtAddress2.Value = Me.cboAgentFirmID.Column(3)
Me.txtAddress3.Value = Me.cboAgentFirmID.Column(4)
Me.txtTown.Value = Me.cboAgentFirmID.Column(5)
Me.txtPostcode.Value = Me.cboAgentFirmID.Column(6)
End Sub

I originally had a first line Me.txtAgentFirm.Value = Me.cboAgentFirmID.Column(1) but deleted it because the AgentFirm is being entered in the AgentFirmID box (why??)

AgentFirmID, which is the autonumber primary key (see query 1) in Agent Firm is the link between the two tables in the relationship.

Query three: A major feature should be that if an AgentFirm changes its name, or address, phone number, etc this is reflected immediately across all related entries. And it does not happen: each one has be updated manually.

(Imagine if a bank changed its name and had to alter each account manually!) How do I make it work as I am sure it is meant to?

View 13 Replies View Related

Combo Box Not Updating Table Field Properly

Aug 16, 2005

I have created a combo box with the two fields CompanyID and CompanyName. I used a query for my combo box and it looks at my company info table for the info. I want it to update the two same fields on my contact Table but it updates the company name field with the CompanyID and and the company ID field dosent update at all. I am not sure were I went wrong please help.

Rickilynn

View 3 Replies View Related

Forms :: Updating Table From Cascading Combo Box(s) Fox?

Mar 25, 2013

updating my table when I use cascading combo boxes in my form.What is happening is that my table is being populated by the xxxxID column vice from the xxxxName column that is being used from that specific table.

here is my visual basic code that I am using to determine what the subsequent combo box will display.

Option Compare Database
Option Explicit
Private Sub cboPlanktonID_AfterUpdate()
' Set the Family combo box to be limited by the selected Plankton Type
Me.cboFamilyID.RowSource = "SELECT tblFamily.FamilyID, tblFamily.FamilyName FROM tblFamily " & _
" WHERE OrderID = " & Nz(Me.cboPlanktonID) & _
" ORDER BY FamilyName"

[code]...

Example of the Combo box Row Source is: SELECT [tblWaterbody].[WaterbodyID], [tblWaterbody].[WaterbodyName] FROM tblWaterbody;

My Control Source is PlanktonAnalysis.WaterbodyName

When I fill in the form with the data, The Waterbody name is visable for selection (example: I see "Lake Lillinonah" in the cascading combo box, But when I save the record in the PlanktonAnalysis Table I get a number in the WaterbodyName column vice the name of the waterbody

PlanktonAnalysisIDWaterbodyName172
311411511677118397104113
tblWaterbodyWaterbodyIDWaterbodyName2Ashland Pond3Bantam Lake4Crystal Lake5Gardner Lake6Hungerford Park Pond7Lake Lillinonah8Lower Bolton Lake9Middle Bolton Lake10Pocotopaug Lake11West Thompson Reservoir

View 4 Replies View Related

Forms :: Combo Box Not Updating Upon Moving To New Record

Jun 26, 2014

I have a tab control with a Counsellor Training tab on it inmy form frmCounsellors. The issue I am having is that when I select a training type from the drop down in the sub form on the tab control on the counsellor training tab and then go to a new record of the main form, not on the sub form, the training type I selected on the form stays the same. If I change it on the second record, it stays at whatever I changed it to, even if I return to the first record it stays at what I changed it to as well.

How do I get it to stay with the counsellor and have it zero out for a new counsellor and it to allow me to enter something different for the new counsellor then save it for that counsellor?I just realised, I am having the same issue with the location combo box but I am sure I could apply a fix to both boxes if I knew one.

View 3 Replies View Related

Forms :: Automatically Updating Dependent Combo Box

Oct 21, 2014

I am designing a form based on specific criteria from a table. I have one table "country/region" showing: Country, Region, and then primary numeric ID. I have another table called "contacts" with more info. What I am looking to do is create two combo boxes on the form, one for country and the other for region which will pull from the "country/region" table and feed into the "contacts" table". When the user writes in the specific country, the corresponding region in the combo box next to it should update automatically.

View 1 Replies View Related

Forms :: Filter Subform By Updating Combo Box

Dec 14, 2014

I have a table contains 5/6 column. now i need to filter the table on a form randomly.

Suppose I have 6 different combo box for 6 column. Now on the sub form the control shows the whole table. i this case i have clicked the 3rd combo box, then it will show the whole column in its list. if i select any one of it the table will show the common values below. then i will click the second combobox which will populate the present data shown into the subform table after the first filter.

After that i wish to filter the fifth column where the fifth combobox will populate the data after the second filtering.

By all means the active data into the column will ony populate into the combobox.

View 1 Replies View Related

Forms :: Prevent Combo Box From Updating Table

May 21, 2015

I have a combo box on my form which loads fields from a table and displays them using

Code:
SELECT DISTINCT table_team.team FROM table_team;

I then use

Code:
=[qry_showteamforedit]![team]

in the default value for the combobox to show the team which is saved in the current record.This is the qry_showteamforedit:

Code:
SELECT table_team.team
FROM table_team RIGHT JOIN table_staff_details ON table_team.ID = table_staff_details.team
WHERE table_team.ID = table_staff_details.team;

My problem is when I move through the records, if I change the selected value using the combo box it changes the actual value in the table from the one that was selected to the new one. If I was on record 1 and the teamid saved in there was 1 . It would display "team one" but if I changed that to "team two" it would change record one to say "team two" instead of "team one".I have been searching and found that this is because it is bound to the table so need to remove the text from Control Source, which when I do, breaks it, and it doesn't display the saved team.

what I would like it to do is display all the teams, but default to the one saved by using the id saved in the main table, but allow me to change this value. I would also like a second cascading combo box which will display a list of subteams dependent on what main team was selected and again, default to the values saved in the main table. I have managed to get cascading combo boxes working but combining them with my tables and queries is proving difficult. This is how my tables would be ( just showing the relevant fields)

Staff_table
ID Name teamID
1 Dave 1
2 Tom 1
3 Matt 2

team_table
ID team subteam
1 team1 subteam1
2 team1 subteam2
3 team1 subteam3
4 team2 subteam4

Is it is the subteams that will be unique I would like to save the subteam ID to the teamID field of the staff_table. that way i can retrieve the team and the subteam using the same ID.

View 2 Replies View Related

Updating Relational Table From Form Using Combo-boxes

Apr 15, 2005

Hi,

I have two tables, tblCountry and tblLocation. With the following structure

tblCountry
ID
Name
Text

tblLocation
ID
Country_fk
Name
Text

As you can guess tblCountry lists all of the countries, tblLocation lists all of the locations in each country, the tblLocation.Country_fk field is linked to tblCountry.ID.

I want the user to be able to edit [tblLocation].[Text] using a form. They simply select the country and then the location using combo-boxes and then add or edit the content using a textbox.

In my form I have a combo-box that displays the country names, the RowSource is set to
SELECT [tblCountry].[ID], [tblCountry].[Name], FROM tblCountry ORDER BY [Name];

I then have a second combo-box that lists the locations for the selected country. This uses an AfterUpdate() procedure to select [tblLocation].[ID] using an SQL query based on the value of the country combo-box. I.e:

SELECT [tblLocation].[ID],[tblLocation].[Name],[tblLocation].[Text] FROM tblLocation WHERE [Country_fk] = " & Me.country_box.Value & " Order By [Name]"


I want to be able to have a textbox that then displays [tblLocation].[Text] for the selected location. Thats where the problem arises. I can't find a way that will let me display any content thats available for the selected location AND let me edit it. I've tried using UpdateAfter procedures, different bindings (tables, queries based on the value of location combo-box).

Can anyone suggest how I can display [tblLocation].[Text] based on the value of the selected country/location and be able to update the information via a textbox?

Any help would be appreciated!!!

Thanks

Jon

View 3 Replies View Related

Updating Combo Box Defaults With Optionbox And/or Check Box For A Table

Feb 28, 2006

Hi All,

I am wondering if it is possible using VBA to update using either an option group or check boxes as shown in the frmDefaultValue in the attached file to update two tables tblLabelNumber and tblMediaType.

The form frmMedia contains two combo boxes. I am trying to use the form frmDefaultValue with an option group and check boxes as shown as not sure what is the best method here to update the values in the two table tblLabelNumber & tblMediaType at the push of a button Update as in the form?

Look forward to any comments on this.

Robert88

View 8 Replies View Related

Forms :: Populate Combo Box After Updating Text Field?

Mar 19, 2013

I am trying to create a login form with the following three basic fields:

txtUsername
cboUsertype
txtPassword

I would like to be able to populate cboUsertype with User types associated to the user I type into txtUsername. I have found many useful tutorial on the web on login procedures. How ever I hardly found anything on how to populate a combobox after updating a texfield. It bis more than a week that I am trying to find a solution but until now I have just been . I would be grateful if you could provide me with either a link on the web or a vb code to make it work.

View 3 Replies View Related

Modules & VBA :: Combo Box Unexpectedly Updating All Fields In Subform

Oct 19, 2014

I have a sub form that adds and displays appointments related to an order. The form has two combo boxes, cboVenderTypeID and cboVenderID and a date picker. There is a 3rd combo box on the parent form called OrderNode. The contents the cboVenderID combo box are filtered by the selections made in cboVenderTypeID and VenderID comb boxes. This works fine and adds the appropriate appointment to tblAppoints. The problem is when I try to add an appointment with of a different type (different value in cboVenderTypeID) all the values in the existing appointments change to the latest value selected in cboVenderTypeID.

Private Sub cboVenderTypeID_AfterUpdate()
Dim strSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
If Me.cboVenderTypeID = 4 Then

[Code] ....

View 1 Replies View Related

Forms :: Combo Box On Continuous Form Updating Current Record Only

Jul 29, 2013

Combo box on continuous form should have the control source listed as the field on the form that will be updated. The Row Source, however, is a query that includes 2 things: the field on the form that will be updated (this part will be nonvisible in your form) and the table/query of selections you want to show up in the combo box (visible). Then ensure the Bound column is set to 1 and the Column count is set to 2 with Column Widths as 0";1"

View 1 Replies View Related

Forms :: Combo Box Works In A Form But Not Updating Field Using Combobox Value

Jul 24, 2014

This DLookUP works correctly...

UNDER CONTROL SOURCE:
=DLookUp("[First Name]","Contacts","[Combo378]='" & [Forms]![PROFILE]![Combo378] & "'")

but when a I want to close the form, display the error:

You must enter a value in the Profile.First Name

I junt need the way to update the field in the new table...

View 6 Replies View Related







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