473,396 Members | 2,010 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,396 software developers and data experts.

Forms: Copying text value to same field in next record?

Horsefeathers
Greetings... this is my first post here, so apologies in advance for the wordy explanation of my situation.

Here it is: I'm designing a database for tracking the ingress/egress of inventory by serial number. At this point I'm stumped on the "receive inventory" form. What I'm trying to do is provide a form with four text boxes -- Date, Name, PartNumber and SerialNumber. Date function is trivial, figured that one out. SerialNumber is to be scanned in, so no problems there... but Name and PartNumber are a problem. I need for the text form to automagically repeat (DefaultValue?) the most recent entry used in that form -- to avoid unnecessary repetition, so the receiver can simply type/select a name and part number and then rapid scan any boxes corresponding to that part. Then when a different part needs to be "received," the new value can be either typed in or selected, rapid scanning of SNs following accordingly. I know this can be done, but for the life of me, I can't find what I need to get it done. I hope this makes sense to someone... TIA
Jul 6 '07 #1
5 1795
ADezii
8,834 Expert 8TB
Greetings... this is my first post here, so apologies in advance for the wordy explanation of my situation.

Here it is: I'm designing a database for tracking the ingress/egress of inventory by serial number. At this point I'm stumped on the "receive inventory" form. What I'm trying to do is provide a form with four text boxes -- Date, Name, PartNumber and SerialNumber. Date function is trivial, figured that one out. SerialNumber is to be scanned in, so no problems there... but Name and PartNumber are a problem. I need for the text form to automagically repeat (DefaultValue?) the most recent entry used in that form -- to avoid unnecessary repetition, so the receiver can simply type/select a name and part number and then rapid scan any boxes corresponding to that part. Then when a different part needs to be "received," the new value can be either typed in or selected, rapid scanning of SNs following accordingly. I know this can be done, but for the life of me, I can't find what I need to get it done. I hope this makes sense to someone... TIA
You hit the nail on the head- programmatically change the Default Values for the Fields involved, and these values will automatically show when New Record(s) are added.
Jul 7 '07 #2
Thanks for the reply. Sorry if I was less than clear about what I'm trying to do. I understand how to apply a "static" default value as you descibed, but this is a little different. What I am specifically trying to do here is to allow the end user to enter a value in a text box, and then make that entered value appear in that field for all subsequent record entries -- until the user changes it. This form will be used for receiving multiple units of single stock items -- where the employee will select or enter a part number one time (until moving on to the next pn), then simply scan each barcode corresponding to that part number. The reason for doing this is to avoid wasting time on repetitive part number entries. I'm guessing there's a handy VBA trick for this, but I'm not very conversant in VBA... yet. ;)
Jul 9 '07 #3
kepston
97 Expert
In the AfterUpdate event of your part number (here as PartNo) field:
Expand|Select|Wrap|Line Numbers
  1. Me.PartNo.DefaultValue = Me.PartNo
Jul 9 '07 #4
In the AfterUpdate event of your part number (here as PartNo) field:
Expand|Select|Wrap|Line Numbers
  1. Me.PartNo.DefaultValue = Me.PartNo
Thanks for the reply.

I copied the code into the AfterUpdate property (and checked that the name of the control was set to 'PartNo"), but in testing it I got an error saying that "Access can't find the macro 'Me'." Seems I am missing something...
Jul 9 '07 #5
Nevermind, I figured it out. Thanks again for the code help.

For those who run into a similar problem, I did the following:

In the "After Update" event, select [Event Procedure].
Click on the [...] ellipsis on the right.
type (or paste) [Me.PartNo.DefaultValue = Me.PartNo] (w/o the brackets) or whatever code applies to your situation.
Save and close the VBA page.

Great forum! Many thanks to all who responded... I hope I can someday return the favor. :)
Jul 9 '07 #6

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

Similar topics

5
by: Bjorn | last post by:
Hi, I need to submit in the same page two forms to two different ASP-pages. I created two forms, each with hidden input and a submit button. But it doesn't work. Nothing happens with the second...
4
by: Gordon Burditt | last post by:
What's the easiest way to copy a row from one table to another (with the same schema), without knowing in advance the number and types of the columns? The problem: I have several sets of tables...
1
by: ubmc | last post by:
Revised form layout by dragging/dropping fields from field list and deleting unwanted fields. However, unable to go to next existing record or return to previous existing record, but can add new...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: Jay | last post by:
This is a strange one that I can't seem to find a fix for. We have a Billing DB application (Access 2000 format) where we upload billing info in a comma delimited text file to our printer who...
6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly),...
1
by: Ratnest | last post by:
Hi, I'm new to Microsoft Access today, so this is probably a very basic question for all you clever people out there. Anyone know how I copy down a column in Microsoft Access? It doesn't seem...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
6
by: Kevin | last post by:
I've got an mdiParent form. I open an instance of a child form like this: Dim frmChild as New frmCustomers frmChild.Show() I've got a few of these open at a time. On each frmChild I open...
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: 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,...
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
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...
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
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,...

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.