A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Pre-fill controls in subsequent records of continuous form



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2007, 02:14 PM posted to microsoft.public.access.forms
rheath
external usenet poster
 
Posts: 7
Default Pre-fill controls in subsequent records of continuous form

In a form (actually subform - but I don't think that makes a difference) in
which multiple records all have mostly the same control information (except
one control-StudentName) I would like all those other fields on the form to
pre-fill with the previous record info. Now, they are all blank and have to
be entered again. I thought about making a subform with just the name field.
But isn't there an easier way?
  #2  
Old July 17th, 2007, 02:32 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Pre-fill controls in subsequent records of continuous form

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up. The
code copies all fields down, but is clever enough not to try to duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied in
the "exception list."

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the form
to
pre-fill with the previous record info. Now, they are all blank and have
to
be entered again. I thought about making a subform with just the name
field.
But isn't there an easier way?


  #3  
Old July 18th, 2007, 12:52 AM posted to microsoft.public.access.forms
rheath
external usenet poster
 
Posts: 7
Default Pre-fill controls in subsequent records of continuous form

I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be preloaded. If
this were Cobol I'd know what to do (tells you how old I am....) Wish I knew
more VB but I'm a math faculty now and only get to dabble in this once in a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up. The
code copies all fields down, but is clever enough not to try to duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied in
the "exception list."

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the form
to
pre-fill with the previous record info. Now, they are all blank and have
to
be entered again. I thought about making a subform with just the name
field.
But isn't there an easier way?



  #4  
Old July 18th, 2007, 01:19 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Pre-fill controls in subsequent records of continuous form

See:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be preloaded.
If
this were Cobol I'd know what to do (tells you how old I am....) Wish I
knew
more VB but I'm a math faculty now and only get to dabble in this once in
a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up. The
code copies all fields down, but is clever enough not to try to duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied in
the "exception list."

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a
difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the
form
to
pre-fill with the previous record info. Now, they are all blank and
have
to
be entered again. I thought about making a subform with just the name
field.
But isn't there an easier way?


  #5  
Old July 25th, 2007, 11:40 PM posted to microsoft.public.access.forms
rheath
external usenet poster
 
Posts: 7
Default Pre-fill controls in subsequent records of continuous form

I did eventually figure out how to recompile with the missing DAO library.
I tried to not carryover 3 of the fields- an ID field and the 2 names
associated with it the came from a combo box.
But when I tested it, the first field is a combo box of a
CourseID/Coursename and it gave me the error:
Can not carry values over. Form , formname has no records.
Can you help again?

"Allen Browne" wrote:

See:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be preloaded.
If
this were Cobol I'd know what to do (tells you how old I am....) Wish I
knew
more VB but I'm a math faculty now and only get to dabble in this once in
a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up. The
code copies all fields down, but is clever enough not to try to duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied in
the "exception list."

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a
difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the
form
to
pre-fill with the previous record info. Now, they are all blank and
have
to
be entered again. I thought about making a subform with just the name
field.
But isn't there an easier way?



  #6  
Old July 26th, 2007, 06:01 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Pre-fill controls in subsequent records of continuous form

It works only with bound forms, where there are records.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
I did eventually figure out how to recompile with the missing DAO library.
I tried to not carryover 3 of the fields- an ID field and the 2 names
associated with it the came from a combo box.
But when I tested it, the first field is a combo box of a
CourseID/Coursename and it gave me the error:
Can not carry values over. Form , formname has no records.
Can you help again?

"Allen Browne" wrote:

See:
http://allenbrowne.com/ser-38.html

"rheath" wrote in message
...
I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be preloaded.
If
this were Cobol I'd know what to do (tells you how old I am....) Wish
I
knew
more VB but I'm a math faculty now and only get to dabble in this once
in
a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up.
The
code copies all fields down, but is clever enough not to try to
duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied
in
the "exception list."

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a
difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the
form
to
pre-fill with the previous record info. Now, they are all blank and
have
to
be entered again. I thought about making a subform with just the
name
field.
But isn't there an easier way?


  #7  
Old July 26th, 2007, 04:22 PM posted to microsoft.public.access.forms
rheath
external usenet poster
 
Posts: 7
Default Pre-fill controls in subsequent records of continuous form

There are records on this form whose controls are bound.

Where does it expect to get the info from, if not the first record on the
form?

So, is there no way to fill a 2nd, 3rd, 4th, etc record (one at a time, as
you need them) with info in first record? I'm not sure why you'd ever want
to

I did try the first method of the 2 you suggested which directed me to
another MVP's page who suggested setting Me.DefaultValue with
Me.ControlValue. This did set the default and the second record was
pre-filled with that default, but there was no way to change that. It
wouldn't let me alter the control value in the form (just in case some
fields/controls need to be altered from the usual prefilled value).

Any help would be appreciated.
Thanks,
Ruth Heath

"Allen Browne" wrote:

It works only with bound forms, where there are records.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
I did eventually figure out how to recompile with the missing DAO library.
I tried to not carryover 3 of the fields- an ID field and the 2 names
associated with it the came from a combo box.
But when I tested it, the first field is a combo box of a
CourseID/Coursename and it gave me the error:
Can not carry values over. Form , formname has no records.
Can you help again?

"Allen Browne" wrote:

See:
http://allenbrowne.com/ser-38.html

"rheath" wrote in message
...
I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be preloaded.
If
this were Cobol I'd know what to do (tells you how old I am....) Wish
I
knew
more VB but I'm a math faculty now and only get to dabble in this once
in
a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it up.
The
code copies all fields down, but is clever enough not to try to
duplicate
the autonumber or copy to calculated fields and controls, or unbound
controls. You can also specify particular fields you don't want copied
in
the "exception list."

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a
difference)
in
which multiple records all have mostly the same control information
(except
one control-StudentName) I would like all those other fields on the
form
to
pre-fill with the previous record info. Now, they are all blank and
have
to
be entered again. I thought about making a subform with just the
name
field.
But isn't there an easier way?



  #8  
Old July 27th, 2007, 10:18 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Pre-fill controls in subsequent records of continuous form

Sorry, Ruth: I'm down with the 'flu at present, not able to think straight.

Perhaps someone else can make a suggestion.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"rheath" wrote in message
...
There are records on this form whose controls are bound.

Where does it expect to get the info from, if not the first record on the
form?

So, is there no way to fill a 2nd, 3rd, 4th, etc record (one at a time, as
you need them) with info in first record? I'm not sure why you'd ever
want
to

I did try the first method of the 2 you suggested which directed me to
another MVP's page who suggested setting Me.DefaultValue with
Me.ControlValue. This did set the default and the second record was
pre-filled with that default, but there was no way to change that. It
wouldn't let me alter the control value in the form (just in case some
fields/controls need to be altered from the usual prefilled value).

Any help would be appreciated.
Thanks,
Ruth Heath

"Allen Browne" wrote:

It works only with bound forms, where there are records.

"rheath" wrote in message
...
I did eventually figure out how to recompile with the missing DAO
library.
I tried to not carryover 3 of the fields- an ID field and the 2 names
associated with it the came from a combo box.
But when I tested it, the first field is a combo box of a
CourseID/Coursename and it gave me the error:
Can not carry values over. Form , formname has no records.
Can you help again?

"Allen Browne" wrote:

See:
http://allenbrowne.com/ser-38.html

"rheath" wrote in message
...
I tried this, but got a compile error on the line:
Dim rs As DAO.Recordset 'Clone of form
I don't understand enough VB to know how to fix this.
Can you help me further?
I do appreciate your help.
THis is for a continuous form in dataentry Yes so there is no 'first
record'. If it is the first time through, nothing should be
preloaded.
If
this were Cobol I'd know what to do (tells you how old I am....)
Wish
I
knew
more VB but I'm a math faculty now and only get to dabble in this
once
in
a
while.
Ruth
"Allen Browne" wrote:

See:
Assign default values from the last record - Carry data over
at:
http://allenbrowne.com/ser-24.html

Copy the code into your database, and follow the steps to set it
up.
The
code copies all fields down, but is clever enough not to try to
duplicate
the autonumber or copy to calculated fields and controls, or
unbound
controls. You can also specify particular fields you don't want
copied
in
the "exception list."

"rheath" wrote in message
...
In a form (actually subform - but I don't think that makes a
difference)
in
which multiple records all have mostly the same control
information
(except
one control-StudentName) I would like all those other fields on
the
form
to
pre-fill with the previous record info. Now, they are all blank
and
have
to
be entered again. I thought about making a subform with just the
name
field.
But isn't there an easier way?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.