Repeat Field Value

S

sharontodd

I've tried to post this several times, but it's not coming up on a search
afterward.

This should be super easy but I can't find it in here or in help.

I have a form that accepts info for screen printing orders. Fields include
item (shirt, short, hoodie), color, size, etc. After the user enters the
first record, I would like item and color to automatically be entered in each
new record with the option of the user being able to change it since this
will most often just repeat.

Thanks
 
J

John W. Vinson

I've tried to post this several times, but it's not coming up on a search
afterward.

This should be super easy but I can't find it in here or in help.

I have a form that accepts info for screen printing orders. Fields include
item (shirt, short, hoodie), color, size, etc. After the user enters the
first record, I would like item and color to automatically be entered in each
new record with the option of the user being able to change it since this
will most often just repeat.

Thanks

It's appeared several times.
It's been answered several times.
It's frustrating replying here because you don't post a real email address,
and evidently have been deceived into thinking that Microsoft's buggy, flaky,
unreliable webpage is the only way to get at these messages. It's NOT.

To answer the question once more (just should you get lucky with the webpage):

Use a little VBA code in the AfterUpdate event of each control that you want
to make "sticky":

Private Sub txtColor_AfterUpdate()
Me!txtColor.DefaultValue = """" & Me!txtColor & """"
End Sub

That's four consecutive " marks before and after - putting a double
doublequote inside a doublequote delimited string stores a single doublequote
(how's THAT for doubletalk!) so this will set the textbox's DefaultValue
property to (say)

"Mauve"

and the next record will pick that up as the default.
 

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

Similar Threads


Top