473,770 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

update table from combo box

1 New Member
I am currently trying to create an application which will help me in my work. To do this I need to update a field called "Installati ons" in a table with the same value for all records. The value however is from a list of about 1300 military installations so typing in the value in an update query is not optimum.

I am able to get a combo box in a form to bring up the list and to get a parameter query to come up (after selecting the appropriate item in the list) which has the value in it but don't know how to get the table to update. I'm wondering if an AfterUpdate action is needed as a combo box event rather than the query. Not really sure here...it's been many years since I've taken a VB programming course and I really don't use it much..my work is mostly in Access but without much programming needed. Any help appreciated.
Betty
Mar 26 '07 #1
1 4757
developing
110 New Member
if everythings in the same table then oyu can use the bookmark property....a relaly quick way is to put the following in the combo box's after update event

Expand|Select|Wrap|Line Numbers
  1.  Me.RecordsetClone.FindFirst "[respective field in the table] = " & Me!cboComboBox]
  2.         Me.Bookmark = Me.RecordsetClone.Bookmark

ps: depending on the field type of the column, you might have to use different formatting where the following is concerned:
"[respective field in the table] = " & Me!cboComboBox]
Mar 26 '07 #2

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

Similar topics

3
3895
by: dixie | last post by:
I have a form full of subforms which bring summary information onto the form from about 12 different tables. I am trying to get all of that summary information (mainly numbers) into 1 large table that represents the final results for the year. The table into which I wish to save it has 10 records, the past 10 years results. The problem is that I select the calendar year from an unbound combo box and it runs a filter that restricts the...
1
2094
by: Jimmy Tran | last post by:
Hi everyone, I have a form consisting of a combo box and two listboxes, they get their control source from a query. the whole form suppose to update a table. when i run the form, i pick an item off of the combo box and hit on refresh. It seems the only thing gets updated into the table is the item from the combo box. the listboxes data doesn't get updated into the table. I click on both of it and it does get updated into the table. but...
1
1711
by: Dreamerw7 | last post by:
Hi, I know this is probably a dumb question, but here goes: I have 3 tables: REGION REG_ID REGION
6
15636
by: eclypz | last post by:
Whe i use a combobox, and i want it to update it's value i use the code ME.cbxname.Requery How can i do that to update the value of a textbox? i have already try to use the same expression, but it doesn't work :(
1
1925
by: Sasa | last post by:
Hello, i have a problem with a query that update a table with the combo value and i have n combo. Ok, but when i don't insert any value in one combobox and run the query, all the value are insert in the table also the blank value that i don' t want to be update. The query that i use is: UPDATE SET . = Forms!!Combo_Excel, . = Forms!!Combo_Access, . = Forms!!Combo_PowerPoint, . = Forms!!Combo_Project, . = Forms!!Combo_English, . =...
2
4815
by: technocraze | last post by:
Hi guys, I have encountered this error when updating the values to the MS Acess table. Error : Update on linked table failed. ODBC sql server error Timeout expired. MS Acess is my front end and sql server is my backend server. This error occured whenever i step through and when it reaches rs.update it jux hangs down there and thereafter it shwn the aforementioned error. I am using the RecordSet properties to add the values. Can I use...
28
3272
by: jverri01 | last post by:
First, I am relatively new to working with variables. Most of my experience has been with interface design. i am using ACCESS ver. 2003, running in Windows XP. Second, I spent an hour searching through articles and posts to make sure the information I am seeking is not already posted on the site. I am beating my head against the wall trying to figure out something that seems like it should be very simple. The trouble is I do not fully...
4
3032
by: Swinky | last post by:
I am trying to make a combo box dependent on a text box. I cannot get the combo box to pull the related data from the text box. I have been all over this user group & have tried several versions of code to no avail. I would like to display all contact names (in the combo box) related to the customer number in the text box. Here's what I have:
4
5825
by: injanib via AccessMonster.com | last post by:
I have a combo box called "Recipient" who's row source is a table called "Main" with three columns. The three columns are "Name", "Floor", "Location". Following the combo box are two fields called "Floor" and "Location". The after update event of the combo box runs the following lines to update the next two fields. = Recipient.Column(2) = Recipient.Column(3) The combo box is not limited to the values in its rowsource table. What I
6
1895
by: aBheE | last post by:
i am trying to implement an application in order to keep rercords of the stationary of a company. i have a combo box named ComboP_Name In FormProducts form,which is getting the values from the ProductName field of products table and ActualQOH is the table which is getting the corresponding quantity on hand value from the same table, the problem is it does not work that way. when i select the product i want from the combo box the textbox does not...
0
10228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.