Populate Data from previous record

jen18126

New member
Local time
Today, 07:30
Joined
Jan 27, 2012
Messages
4
ok so I have been researching this question all day! and have tried every possible answer that I have found.. however I am still having issues.

I have 6 fields on a form that I would like to carry over the data from those fields to the next record... I can not set the default to a specific value because it could change.

I have 3 combo boxes and 3 text boxes... I can get one of the combo boxes to work, but not the other 2 and I receive errors on them every time even though it is the exact same code I have tried on all 3.

I have tried the following code(s) below

1
const cQuote=""""
me!Control.DefaultValue = cQuote & me!Control.Value & cQuote
This works on the first combo box but not the other 2 and works on text boxes.

2
In the After Update event of the UserName field put code like this:
Me![UserName].Tag = Me![UserName].Value

In the On Enter Event of the same field put code like this:
If Not Me.NewRecord Then Exit Sub
If Not (IsNull(Me![UserName].Tag) Or Me![UserName].Tag = "") Then
Me![UserName].Value = Me![UserName].Tag
End If

I have tried this also, and it works but did not show the values and still gave me an error on my other 2 combo boxes.

The error I receive is a Run Time Error 438 Object Doesnt Support This Property or Method.

I have also tried Allen Brownes Assign default values from the last record
and that did not work either. I received errors.
 
Haven't used the second method, but the first method is tried and true!

What are the Datatypes of the Bound Fields for the errant Comboboxes?

What Version of Access are you running?

If you're running 2007 or 2010, do the errant Comboboxes have their MultiSelect Property set to something other than None?

Linq ;0)>
 
Last edited:
I am using Access 2010.. the datatypes are just Text.. I have the combo box populating from another table that is a linked table.. but the combo box that works is set up the same way too..

In the table the field is just set as Text..and the lookup is a text box (not a combo box) I created the combo box for it on the actual form and then populated it based on data from another table.

By the way.. I couldnt find the MultiSelect Property for the combo box.. is that for the Data type of combo box only?
 

Users who are viewing this thread

Back
Top Bottom