473,466 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Create an add/edit form in access 2007

1 New Member
Hi, I want to create an inventory on access. I want to create a form that can either add a new item or edit an existing item in a table. If I place a barcode in the barcode textbox in the form, I would like all the other textboxes to show the corresponding product information for quick editing. If not, I want all textboxes to remain blank, and a new entry to be added to the table. How might I go about doing this?
Jun 22 '11 #1
2 2842
NeoPa
32,556 Recognized Expert Moderator MVP
That's a risky idea if, as it sounds, you want the BarCode TextBox to be a bound control of your form. How would the operator use it both to select a new item as well as update an existing one (which is after all the natural expectation of a user in those circumstances)?

What is a sensible approach is to create a separate, unbound TextBox (possibly in the Header section of the form) which is used specifically for selecting the record to navigate to. In such a case you would need to make sure you handled the possibility that the user navigated away from the current record without saving any existing changes.

Basically though, in the AfterUpdate event procedure of this new TextBox (we'll call txtBCNav for now) you would have some code to navigate to the correct record, or go to the new record if no matching one were found, and ensure the BarCode TextBox had the value already defaulted to the value from txtBCNav (Only required for New records of course).
Jun 22 '11 #2
jimatqsi
1,271 Recognized Expert Top Contributor
"I want to create an inventory on access. I want to create a form that can either add a new item or edit an existing item in a table"

Have you designed the database already? There is a new form wizard to help get you started. Your question is a bit broad for a forum such as this. Study the examples in the sample database that came with your Access installation.
Jun 22 '11 #3

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

Similar topics

16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
1
by: ishwarjoshi | last post by:
I am in the process of upgrading an old Access ADP/SQL 2000 App to Access 2007 ADP/SQL 2005. There are a lot of buttons in the Access form which are calling Access Macros, the Macros call...
1
by: BMF | last post by:
Howdy, I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables. Table ID --- userID -- AutoNumber UserInfo -...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
2
by: ijyoung | last post by:
Am trying to customise automation in Access 2007/Outlook. Using MS template which works ok. However, I have the form set up as a subform an embedded in the main form Although the form works fine in...
4
Kitty001
by: Kitty001 | last post by:
Hi Guys I am new to MS Access and using MS Access2007. I have been fooling around with Access trying to solve this problem for weeks but i just cant seem to chack it and I need some help. I have...
5
by: sphinney | last post by:
Basic question: Does anyone know how to go about adding a control to an Access 2007 form that will allow viewing a Word 2007 document? Reason for asking: My office is about to receive 100+/-...
0
by: ncsthbell | last post by:
I have a request to programatically create a .pdf file from within a current access application. The problem is that they want this one .pdf file to contain both an access report (created by the...
4
cobra35y
by: cobra35y | last post by:
Good Afternoon, I am new to the world of programming. after reviewing this site for info pertaining to my situation, i have declared a loss and posting for help. maybe i am just overlooking the...
5
by: Ruth Myers | last post by:
Hi all - I have created a form to describe digital photographs (JPGs) attached to my database. Along with the attachment image, I've also added a field that displays attachment name. However,...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.