Pre-filling fields with previous entries...

  • Thread starter Thread starter Damon Heron
  • Start date Start date
D

Damon Heron

I have a main form bound to a recordsource with a subform that has a linked
set of records.
As the user moves thru the subform, I have a routine like this to put
default info into the various fields of the subform:


Private Sub Form_AfterInsert()
Const cQuote = """"
Me!txtDate.DefaultValue = cQuote & Me!txtDate.Value & cQuote
Me!cboGrower.DefaultValue = cQuote & Me!cboSupplier.Value & cQuote
Me!cboLocation.DefaultValue = cQuote & Me!cboLocation.Value & cQuote
............... etc.
End Sub

This works fine, except when the user moves to another record on the main
form - then the subform defaults show the previous records entries, not that
records (previous) entries.
Is there a way to have it default to the parent's previous entries?

Thanks in advance.
Damon
 
what if you declare variables to hold the 3 defaults in your main form
and then proceed as before?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top