473,395 Members | 1,745 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,395 software developers and data experts.

Edit a Record

ChaseCox
294 100+
Hi everyone,

I am working on a new database and this one is slightly different than what I have done. I now need to be able to manipulate the information in a table. What I would like to do is be able to select a physical part (TV, Computer, ect) from a drop down box (I have this working) and based on what I select be able to populate several more boxes on the form with that parts information. For Example:

If I were to select TV from the Combo Box, I would like the other boxes to be filled in with the TV's Cost (in one box), date purchased (in another box), part number (in another box)...

I would then like to be able to update some of the information and then save it back into the database, updated. It is not nescessary to keep the previous information.

I hope this is clear enough.

Any help would be greatly appreciated.

Thanks
Jun 27 '07 #1
6 1428
Stang02GT
1,208 Expert 1GB
If you check out this website i think it will guide you in the right direction!



http://www.mvps.org/access/forms/frm0028.htm
Jun 27 '07 #2
ChaseCox
294 100+
Thanks for the reply, But I don't think that is going to do what I want.

For Example if I had selected the part in the table, I would like the other boxes to show the related information and allow me to update them. It seems like that link you posted is only going limit the options in the box.
Jun 27 '07 #3
ChaseCox
294 100+
Nevermind I think this will work, do you have any idea about how to have the value sho in the box, and not just in the list?
Jun 27 '07 #4
ChaseCox
294 100+
sorry about that. I figured that out too. Thanks for the help Stang.
Jun 27 '07 #5
ChaseCox
294 100+
Thought I might share my solution to the problem:

For my case, Inventory is the table, and ProductNumber is the field I am concerned with (column heading in table).

I then needed to relate the field I am wanting information about to the input from the combo box. That is what I am doing here:
Expand|Select|Wrap|Line Numbers
  1. "[Product] = cmb12.value"
  2.  
So for example if I typed in TV to the combo box, the combo box would display the appropriate Product Number.

The following is the actual code I inserted in the Form:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmb12_AfterUpdate()
  2.  
  3. Dim varx As Variant
  4.  
  5. varx = DLookup("[ProductNumber]", "Inventory", "[Product] = cmb12.value")
  6. cmb13 = varx
  7.  
  8. Me!cmb13.Requery
  9.  
  10. End Sub
  11.  
  12.  
Jun 27 '07 #6
Stang02GT
1,208 Expert 1GB
Thank you for sharing! I'm glad you were able to solve your problem
Jun 28 '07 #7

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

Similar topics

25
by: dixie | last post by:
I have some code that adds new records into a table for each ID in a list box when a button on a form is clicked. This works fine. My problem now is that I wish to be able to edit all the records...
2
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last,...
1
by: Randall Parker | last post by:
Currently in an asp:DataGrid I have a column for bringing up an edit form on a particular row and that is done by a hyperlink as follows: <asp:TemplateColumn HeaderText="Edit Record">...
1
by: ortega.rad | last post by:
I have a form which allows you to select a record. That record has other records asscociated with it via a table. The asscociated records of the record selected on the main form are shown in a...
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
8
by: =?Utf-8?B?bWlrZWc=?= | last post by:
Hi, I am building a small Help Desk application for my company and need to be able to edit "open" help desk issues. I use a simple datagrid to display each issue (6 per page) , with an Edit...
1
by: ollielaroo | last post by:
Hi guys, Firstly I did do a search for this one first but I couldn't find anything related in this forum. I am using Dreamweaver MX and trying to build admin pages for an ASP site. My problem is...
2
by: David | last post by:
Dear All I'm trying to use a multi-select listbox as criteria to either add new record or edit the current record of the destiantation table with each row selected in the box. This works fine...
12
by: dorandoran | last post by:
I followed this link to add new record from gridview. So far it's good but I need to modify the last piece to edit the record that I will supply the record id. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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...

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.