How do I get values to automaticlly repeat in an Access form

G

Guest

In Alpha 5 I can input data via a form where the fields repeat until I change
them. I can also automatically capitalize the first letter in each word in a
form. I have about 12,000 cd selections catalogued in Alpha 5. I would like
fields like composer, cde title, artist etc. to repeat for inputs. There
could be twenty selections on a cd and I am trying not to retype repeating
fields
 
A

Arvin Meyer [MVP]

In code you can use:

Me!ControlName.DefaultValue = """" & Me!ControlName.Value & """"

That's 4 double quotes on either side. You can also use Ctrl+quote to copy
the field above (same as in a spreadsheet) in a continuous form or
datasheet.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
T

tina

see if the following will work for you: add these two functions to a
standard module, as

Public Function isSetDefault()

Screen.ActiveControl.DefaultValue = """" & Screen.ActiveControl.Tag &
""""

End Function

Public Function isSetTag()

Screen.ActiveControl.Tag = Nz(Screen.ActiveControl, "")

End Function

in form design view, select *all* the controls you want to set default
values for. (the title bar of the Properties box should say "Multiple
selection".) type the following expression directly on the AfterUpdate event
property line, as

=isSetTag()

type the following expression directly on the Enter event property line, as

=isSetDefault()

btw, suggest you read up on normalization, to make sure your tables are
properly structured.

hth
 

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

Top