How can I set the current field in a subform (table view) to pick up the value of the same field in the previous record, as the default value - but still have the facility to change it to a different value if required.
Thanks for your reply.
I don't think this is what I'm after. For Example - When I have filled in the first record in a subform and moved to the second record, I want the second record to autofill with certain values from the first record, but still be able to change them if necessary, as I complete the rest of the record.
Yes, that's what I pointed out to you. You can send variables through the OpenArgs method.
But yet a simpler method of solving this, since it seems like you'r not an experienced VBA user.. Would be to create a dummyform which is based on a query that gets data from the latest record. Then do this
Private Sub Form_Load()
DoCmd.OpenForm frm_dummyform, , , , acFormReadOnly, acHidden
End Sub
Private Sub Form_AfterInsert()
Me.frm_dummyform.Requery
End Sub
Private Sub Form_Load()
Me.Field1 = Forms!frm_dummyform!Field1
Me.Field2 = Forms!frm_dummyform!Field2
.. and so on ..
End Sub
I see no reason why that shouldn't work. Hope it helps.
~amcodah()
You've sussed me!!! You're right - I've started playing with Access to try and learn a little more - but have a long way to go. Thanks for your help - and patience!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.