Re: Array of text boxes on form
From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 05/28/04
- Next message: Dirk Goldgar: "Re: Is this an ADO or DAO call?"
- Previous message: Graham Mandeno: "Re: Capturing Parameter Values"
- In reply to: Howard: "Array of text boxes on form"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: Array of text boxes on form"
- Reply: anonymous_at_discussions.microsoft.com: "Re: Array of text boxes on form"
- Reply: Howard: "Re: Array of text boxes on form"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 23:48:52 -0400
"Howard" <anonymous@discussions.microsoft.com> wrote in message
news:13c8b01c44464$5694fec0$a601280a@phx.gbl
> In a previous message, I requested help on inserting many
> records into a table by the click of a button on a form. I
> received the help I needed. I could be creating as many as
> 100 records, setting about a dozen fields in each record.
> There is a lot of repetition. If I could set the fields on
> the form as an array, I could create a loop to create
> these records in far fewer statements. I would need some
> handholding through this to create an array of unbound
> fields in a form. An example of the statements would help
> tremendously. Thanks!
I'm not sure of your details, but it may help to know that you can build
a string index to similarly named control using concatenation of an
index variable, like this:
Dim i As Integer
Dim varValue As Variant
For i = 1 to 12
varValue = Me.Controls("Textbox" & i).Value
Debug.Print varValue
Next i
That will print the values of text boxes named "Textbox1", "Textbox2",
... "Textbox12".
Would you be interested in posting the code you're using now? Maybe we
can suggest ways to simplify it.
-- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup)
- Next message: Dirk Goldgar: "Re: Is this an ADO or DAO call?"
- Previous message: Graham Mandeno: "Re: Capturing Parameter Values"
- In reply to: Howard: "Array of text boxes on form"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: Array of text boxes on form"
- Reply: anonymous_at_discussions.microsoft.com: "Re: Array of text boxes on form"
- Reply: Howard: "Re: Array of text boxes on form"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|