473,472 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Repeat the data from previous records

1 New Member
I current doing a project for "CWS" invoices for data entry in ms access 2000
I have a diffulcuties in the textbox.

for an exampe :
In one invoices may have up to 4 customer .But in 1 invoice the route and date are same and rest is are not same ..

So i have create textboxes to entry all the data in ..
what i want if the date and route is same i dont want to key in the same data where the textbox should retrieve the data automaticaly only for date and route textbox

can u help me how to do this?
I have been try so many sites but still did not get what i need!

thanks
M raj
Oct 24 '07 #1
4 7678
ADezii
8,834 Recognized Expert Expert
I current doing a project for "CWS" invoices for data entry in ms access 2000
I have a diffulcuties in the textbox.

for an exampe :
In one invoices may have up to 4 customer .But in 1 invoice the route and date are same and rest is are not same ..

So i have create textboxes to entry all the data in ..
what i want if the date and route is same i dont want to key in the same data where the textbox should retrieve the data automaticaly only for date and route textbox

can u help me how to do this?
I have been try so many sites but still did not get what i need!

thanks
M raj
Just a little clarification M raj.
  1. You are entering a New Record.
  2. If the Date and Route are the same as the previously entered Record.
  3. Duplicate some Field values on the Form from the prior Record.
  4. If all this is true, then:
    1. What is your Table Name (Record Source for the Form)?
    2. What are the Text Field Names for the Route and Date Fields?
    3. What Fields need to contain the same information from the previous Record, give Route and Date are the same?
Oct 24 '07 #2
AaronMor
1 New Member
Just a little clarification M raj.
  1. You are entering a New Record.
  2. If the Date and Route are the same as the previously entered Record.
  3. Duplicate some Field values on the Form from the prior Record.
  4. If all this is true, then:
    1. What is your Table Name (Record Source for the Form)?
    2. What are the Text Field Names for the Route and Date Fields?
    3. What Fields need to contain the same information from the previous Record, give Route and Date are the same?
I am trying to do the exact same thing that you have both descriibed here. Can anyone please explain how to accomplish this? Thanks

Aaron
Nov 7 '07 #3
missinglinq
3,532 Recognized Expert Specialist
You can do this by using the AfterUpdate event of the controls in question to set the Default Value for those fields. The exact code varies depending on the data type of the field.

For Text fields

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourTextControlName_AfterUpdate()
  2. If Not IsNull(Me.YourTextControlName.Value) Then
  3.   YourTextControlName.DefaultValue = """" & Me.YourTextControlName.Value & """"
  4. End If
  5. End Sub
  6.  

For Numeric fields


Expand|Select|Wrap|Line Numbers
  1.  Private Sub YourNumericControlName_AfterUpdate()
  2. If Not IsNull(Me.YourNumericControlName.Value) Then
  3.   YourNumericControlName.DefaultValue = Me.YourNumericControlName.Value
  4. End If
  5. End Sub
For Date fields

Expand|Select|Wrap|Line Numbers
  1.  Private Sub YourDateControlName_AfterUpdate()
  2. If Not IsNull(Me.YourDateControlName.Value) Then
  3.   YourDateControlName.DefaultValue ="#" &  Me.YourDateControlName & "#"
  4. End If
  5. End Sub
Welcome to TheScripts!

Linq ;0)>
Nov 7 '07 #4
ahalf0rd
2 New Member
You can do this by using the AfterUpdate event of the controls in question to set the Default Value for those fields. The exact code varies depending on the data type of the field.

For Text fields

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourTextControlName_AfterUpdate()
  2. If Not IsNull(Me.YourTextControlName.Value) Then
  3.   YourTextControlName.DefaultValue = """" & Me.YourTextControlName.Value & """"
  4. End If
  5. End Sub
  6.  

For Numeric fields


Expand|Select|Wrap|Line Numbers
  1.  Private Sub YourNumericControlName_AfterUpdate()
  2. If Not IsNull(Me.YourNumericControlName.Value) Then
  3.   YourNumericControlName.DefaultValue = Me.YourNumericControlName.Value
  4. End If
  5. End Sub
For Date fields

Expand|Select|Wrap|Line Numbers
  1.  Private Sub YourDateControlName_AfterUpdate()
  2. If Not IsNull(Me.YourDateControlName.Value) Then
  3.   YourDateControlName.DefaultValue ="#" &  Me.YourDateControlName & "#"
  4. End If
  5. End Sub
Welcome to TheScripts!

Linq ;0)>
Hi Linq

I am having problems deciphering which bits of your code need my personal database details and which are just code. Could you please be a little more specific about which bits of the code need my details.

cheers

Andy
Feb 21 '08 #5

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

Similar topics

2
by: Tom | last post by:
Anyone help on this? PHP/MySQL I have a repeat region displaying records from orders in a CSV format: CalJoe33,18,08/23/2004,FED EX,PREPAID,WEBSITE,CA,Book,25.95,??? CalJoe33,18,08/23/2004,FED...
8
by: duncan.lovett | last post by:
PHP 4 MySQL 4.0.20 DW MW 2004 7.01 This problem is giving me a bit of a headache, and I'm getting nowhere with it so thought I'd open it up to all, any help would be greatly appreciated. ...
2
by: David Neagle | last post by:
I have several fields on a form that may need to carry over the data from the previous entry. At the moment I have SendKeys "^"(')",True in a function. This function is then called in the various...
2
by: Melissa | last post by:
I have a grouped report that starts a new page at each group. All the field labels for the report are in the group header because there is a subreport in the top part of the report that needs to...
9
by: VMI | last post by:
We have this huge application that's based on storing tons of data on a dataTable. The only problem we're having is that storing LOTS of data (1 million records) into a datatable will slow down the...
1
by: roveagh1 | last post by:
Hi I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same...
5
by: keeps21 | last post by:
Ok, so here goes. I need to retrieve data, (ie. id, title, introtext.) from my database and store each in a variable. I then need to repeat this for the next 4 records. So I would have 5...
11
by: dizzydangler | last post by:
Hi, all! I'm a new user, looking to get some help on a form problem in MS Access 2007 I haven't been able to crack. I've built a form that prompts users to enter new record data, then click...
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...
1
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
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: 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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.