Extracting elements from existing record to a new record

M

Mark W

I am wandering if this is possible? A lot of the record
entry we have is duplicated or has been entered in a
previous record with only slight amendments to be made to
the new record.
I would like to create a button that creates a new record
but that prompts the user to specify a previous record,
and then to populate the fields in the new record to be
identical to the record that the user had specified.

Is this possible?

Mark
 
A

Arvin Meyer

Yes, you need to build a recordset that returns a single record, usually
that's done by specifying an ID. You can do that with an SQL statement that
is the rowsource of a combo box. Use the afterupdate event of the combo to
populate the other controls by specifying which column in the combo has the
data for that field. An example might be something like (aircode):

Sub cboWhatever_AfterUpdate()
Me.txtFName = Me.cboWhatever.Column(2) ' 3rd column
Me.txtLName = Me.cboWhatever.Column(3) ' 4th column
' ...
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top