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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|