By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Form Data Entry

P: 8
Can someone please give me advice on how to do the following in a form?

In my form I have a have the user enter a 1 or a 2 in a box for the first record.

I would like to know how I can make every following record contain the number that the user entered for the first record without having the user enter a 1 or 2 ever again.

I appreciate your help
-Yan
Mar 16 '07 #1
Share this Question
Share on Google+
6 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi Yan

If the textbox name was txtValue then in the AfterUpdate event of the textbox you would need to put the value in the Default value of the textbox as follows:
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtValue_AfterUpdate()
  2.  
  3.    Me!txtValue.DefaultValue = Me!txtValue.Value
  4.  
  5. End Sub
  6.  
Mary
Mar 17 '07 #2

P: 8
Hi Mary,
Can you please clarify? I wrote the code but the values in the text box of the subsequent records to not reflect the first value that was entered. Thank you for you help.
Mar 20 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Hi Mary,
Can you please clarify? I wrote the code but the values in the text box of the subsequent records to not reflect the first value that was entered. Thank you for you help.
It will only work if the subsequent records are new records. If not then you will need something more complicated.
Mar 20 '07 #4

NeoPa
Expert Mod 15k+
P: 31,347
If you can say more clearly exactly what you want then we will see what we can do for you.
Mar 20 '07 #5

P: 13
Can someone please give me advice on how to do the following in a form?

In my form I have a have the user enter a 1 or a 2 in a box for the first record.

I would like to know how I can make every following record contain the number that the user entered for the first record without having the user enter a 1 or 2 ever again.

I appreciate your help
-Yan
Sounds like a relationship problem. Without telling us a bit more about the data that you are trying to record, it is a bit difficult to advise you. Are you familiar with the concept of 'normalisation'? It may be that you need extra/intermediate tables to record the data correctly. You can link all the necessary tables together using a query, then create a form from the query.

B
Mar 21 '07 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
Sounds like a relationship problem. Without telling us a bit more about the data that you are trying to record, it is a bit difficult to advise you. Are you familiar with the concept of 'normalisation'? It may be that you need extra/intermediate tables to record the data correctly. You can link all the necessary tables together using a query, then create a form from the query.

B
B is right.

Have a look at this tutorial and see what you think?

Normalisation and Table structures

Mary
Mar 21 '07 #7

Post your reply

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