473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Updating values of a combo box created with a query

1
Hi,
I have the following problem,
I created a query

Expand|Select|Wrap|Line Numbers
  1. SELECT Customer_t.S_Street
  2. FROM Customer_t
  3. WHERE ((([Forms]![Order_t]![Combo45])=[Customer_t]![Billing_Name]));
and used this query to populate a combo box. My customers have multiple shipping addresses. When I first open the form and enter the value for a customer name, I get the right values for shipping addresses but when I try to change the customer name, the values for shipping addresses does not change in the combo box. I get the address values for the first customer entered. However, when I close and re-open the form my combo box shows the right values.

I am using MS Access 2003, SP2

How can I do this, so that I don't need to close and re-open the form every time?

Thanks,
Boray
Jan 16 '07 #1
1 1325
MMcCarthy
14,534 Expert Mod 8TB
Hi,
I have the following problem,
I created a query

SELECT Customer_t.S_Street
FROM Customer_t
WHERE ((([Forms]![Order_t]![Combo45])=[Customer_t]![Billing_Name]));

and used this query to populate a combo box. My customers have multiple shipping addresses. When I first open the form and enter the value for a customer name, I get the right values for shipping addresses but when I try to change the customer name, the values for shipping addresses does not change in the combo box. I get the address values for the first customer entered. However, when I close and re-open the form my combo box shows the right values.

I am using MS Access 2003, SP2

How can I do this, so that I don't need to close and re-open the form every time?

Thanks,
Boray
You need to requery the combo box in the After Update event of the Customer Name textbox.

Expand|Select|Wrap|Line Numbers
  1. Me.[Combobox Name].Requery
Mary
Jan 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ryan.Chowdhury | last post by:
This is a general question regarding the use of view and stored procedures. I'm fairly new to databases and SQL. I've created a SQL database using an Access Data Project ("ADP") and I'm...
3
by: LouD | last post by:
I have 5 tables in my db and when i bring up the linked form I get my product lists Tbls are tbStock, which contain unitcost, sellprice n qty tblProduct, contains ID, medicalname n genericname...
3
by: MX1 | last post by:
I'm ready to pull the hair out of my head. I have a query with a couple of parameters that I want to get from combo boxes on a form. One parameter is a date with a dynamically calculated year and...
2
by: Todd D. Levy | last post by:
I have a table of Country names & Country codes in alphabetical order. This is a lookup table that a number of other tables use to populate the Country field via a drop down Combo Box on the...
15
by: Colin | last post by:
I have a query that calculates the selling price of products on customer orders. Selling prices are calculated based on the average cost of the items when purchased. As I make new purchases, the...
6
by: cyoung311 | last post by:
I'm trying to do an automatic update of one table from another through a form. Basically, when a selection is made for an item, in this case a particular workshop, I want to get the associated...
4
by: LD | last post by:
Is there a way in Access to store more than one value in a field that has been selected from a combo box? For example, if a combo box had three values that you can select, "One", "Two", and...
9
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
3
by: Turflayer | last post by:
Hi, I'm very new to Access, so I hope somebody may help as I've been unable to locate a similar query elsewhere on the forum... I have created a database that is populated via a main form. Part of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.