Tags: access, aprevious, auto, case, certain, create, database, fields, fill, form, microsoft, mysql, oracle, order, prefill, recordin, sql

Prefill Form

On Database » Microsoft Access

3,254 words with 3 Comments; publish: Wed, 04 Jun 2008 03:22:00 GMT; (25062.01, « »)

Is there an Easy way to auto fill certain fields in a form from data of a

previous record?

In my case I have an order, and I wish to create a new one using data from

a previous record. I need this new record to have its own ID, but re use

some of the date of a previous record.

It should be able to use the data from any record and not just the previous

one.

Thanks

Message posted via http://www.droptable.com

All Comments

Leave a comment...

  • 3 Comments
    • Using a continuous form or a datasheet form you can copy a record and paste

      it to a new one. You can do the same thing in code. There is even a Wizard

      to write the code to Duplicate records (although the code is embarrassingly

      archaic)

      Arvin Meyer, MCP, MVP

      Microsoft Access

      Free Access downloads:

      http://www.datastrat.com

      http://www.mvps.org/access

      "Edgar Chado via droptable.com" <forum.ms-access.todaysummary.com.nospam.droptable.com> wrote

      in message news:08bd5318e91d4dc09bd06bb65c66b35c.ms-access.todaysummary.com.droptable.co m...

      > Is there an Easy way to auto fill certain fields in a form from data of a

      > previous record?

      > In my case I have an order, and I wish to create a new one using data from

      > a previous record. I need this new record to have its own ID, but re use

      > some of the date of a previous record.

      > It should be able to use the data from any record and not just the

      previous

      > one.

      > Thanks

      > --

      > Message posted via http://www.droptable.com

      #1; Wed, 04 Jun 2008 03:23:00 GMT
    • Arvin,

      Thanks for your reply.

      What I need is an easy way to populate a form with certain data from a

      prevous record, so the users do not need to type all the data again.

      Is this possible?

      Message posted via http://www.droptable.com

      #2; Wed, 04 Jun 2008 03:24:00 GMT
    • It is possible with the immediately previous record. You can set the

      defaultvalue property so that each subsequent record tales the value of the

      control of the previous record. In the AfterUpdate event for the control put

      Me.ControlName.DefaultValue="""" & Me.ControlName & """"

      Enclosing the value within 4 double-quotes is the iron clad

      way to set the defaultvalue for any datatype

      Arvin Meyer, MCP, MVP

      Microsoft Access

      Free Access Downloads

      http://www.datastrat.com

      http://www.mvps.org/access

      "Edgar Chado via droptable.com" <forum.ms-access.todaysummary.com.droptable.com> wrote in

      message news:081eb34b16eb4e50bd0f912ebc8c0ad9.ms-access.todaysummary.com.droptable.co m...

      > Arvin,

      > Thanks for your reply.

      > What I need is an easy way to populate a form with certain data from a

      > prevous record, so the users do not need to type all the data again.

      > Is this possible?

      > --

      > Message posted via http://www.droptable.com

      #3; Wed, 04 Jun 2008 03:25:00 GMT