If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Preautopopulate Form record
How do I create a new record in a form copying (autopopulating) data from the
previous record? I already have created three forms. Would I have to redo forms? Is this possible? Would I need to use code? -- Jane Marlotty |
#2
|
|||
|
|||
Preautopopulate Form record
Jane
You've described "how". Now, "why?" What would having a new record that was an essential duplicate of the previous record allow you to do? (often when folks are trying to copy a previous record it is because they are used to working in Excel rather than Access). Regards Jeff Boyce Microsoft Office/Access MVP "JaneM" wrote in message ... How do I create a new record in a form copying (autopopulating) data from the previous record? I already have created three forms. Would I have to redo forms? Is this possible? Would I need to use code? -- Jane Marlotty |
#3
|
|||
|
|||
Preautopopulate Form record
If, by "copying (autopopulating) data from the previous record" you mean can
you enter one record, move to a new record and have certain fields populated with the same values from the previous record, yes you can and yes, it'll require code. In your form, you can use the AfterUpdate event of the control holding your data to set the DefaultValue for the field. From that time forward, until you either manually change the data or close your form, the data will be entered automatically in each new record. The syntax varies slightly, depending on the datatype of the data: For Date fields Private Sub YourDateControlName_AfterUpdate() If Not IsNull(Me.YourDateControlName.Value) Then YourDateControlName.DefaultValue ="#" & Me.YourDateControlName & "#" End If End Sub For Text fields Private Sub YourTextControlName_AfterUpdate() If Not IsNull(Me.YourTextControlName.Value) Then YourTextControlName.DefaultValue = """" & Me.YourTextControlName.Value & """" End If End Sub For Numeric fields Private Sub YourNumericControlName_AfterUpdate() If Not IsNull(Me.YourNumericControlName.Value) Then YourNumericControlName.DefaultValue = Me.YourNumericControlName.Value End If End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200808/1 |
#4
|
|||
|
|||
Preautopopulate Form record
Your question is, of course, pertinent if the OP's intention is to carry
forward ***all*** data from the previous record, but not if he only wants to carry forward certain fields. He doesn't really make this clear. People doing "batch" data entries often find themselves entering ***some*** fields over and over again, and can benefit from the technique I offered. An example would be the weekly entering of delivery tickets, where the operator might have to enter dozens of tickets for a given date, then move on to another date and do the same. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200808/1 |
#5
|
|||
|
|||
Preautopopulate Form record
Yup, I've used the DefaultValue approach to carry values forward into new
records, and only for a limited number of controls. Without more information, it's hard to offer more specific suggestions... Regards Jeff Boyce Microsoft Office/Access MVP "Linq Adams via AccessMonster.com" u28780@uwe wrote in message news:89430893e77ec@uwe... Your question is, of course, pertinent if the OP's intention is to carry forward ***all*** data from the previous record, but not if he only wants to carry forward certain fields. He doesn't really make this clear. People doing "batch" data entries often find themselves entering ***some*** fields over and over again, and can benefit from the technique I offered. An example would be the weekly entering of delivery tickets, where the operator might have to enter dozens of tickets for a given date, then move on to another date and do the same. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200808/1 |
#6
|
|||
|
|||
Preautopopulate Form record
True, Jeff! Just had a conversation elsewhere, today, noting that those of us
who answer questions on a regular basis spend at least 25-30% of our time not ***solving problems*** but rather trying to find out, from the OPs, ***what the problem actually is***! -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200808/1 |
#7
|
|||
|
|||
Preautopopulate Form record
On Wed, 27 Aug 2008 01:04:10 GMT, "Linq Adams via AccessMonster.com"
u28780@uwe wrote: True, Jeff! Just had a conversation elsewhere, today, noting that those of us who answer questions on a regular basis spend at least 25-30% of our time not ***solving problems*** but rather trying to find out, from the OPs, ***what the problem actually is***! In my experience, that applies in all areas of life, not just technical. Correctly identifying the problem is not only essential - often, just (clearly and correctly) stating the problem makes the solution obvious. Reviewing some of the longer threads in these groups makes it clear that many problems here don't get stated clearly... and indeed could be solved in moments if they were! -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|