leave information in the field of an access 2003 form btwn record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i need to have fields in the form that LEAVE the data in the field from the
previous record without doing the (ctrl ') to put that data in it. I thought
i could do a form in VBA to do that , but have not found out how. how? or
what language?
 
You can set the DefaultValue property of the controls to the values of the
fields in the previous record.

In the form's AfterUpdate event, put code like:

Me.Control1.DefaultValue = Chr$(34) & Me.Control1 & Chr$(34)
Me.Control2.DefaultValue = Chr$(34) & Me.Control2 & Chr$(34)
Me.Control3.DefaultValue = Chr$(34) & Me.Control3 & Chr$(34)

and so on.

(Note that regardless of the data type of the field, the DefaultValue is
text, so the quotes, provided by Chr$(34), are required.)
 
i need to have fields in the form that LEAVE the data in the field from the
previous record without doing the (ctrl ') to put that data in it. I thought
i could do a form in VBA to do that , but have not found out how. how? or
what language?

For New Record entry?
Code the AfterUpdate event of the control:
Me![ControlName].DefaultValue = Me![ControlName]
 

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