creating text boxes dynamically

farrah

Registered User.
Local time
Today, 21:20
Joined
Jan 2, 2002
Messages
11
Is it possible to create text boxes depending on a value from another text box?
Case: depending on the quantity entered, open up enough text boxes to enable the users to input serial numbers for each item delivered. eg: if quantity delivered is 3 I need 3 individual boxes on the form to allow entry of serial numbers.
I am using a subform to enter the information at the moment and doing a DLookup to make sure I don't exceed no.of lines, but I can not set Enabled to false on the following line, because it still has the focus.
Any ideas how this could be done in a neater way?
Thanks
Farrah
 
If you can have many serial numbers for each part then you need another table/subform with a one to many relationship
 
Rich thanks for your reply...you see when a delivery comes in the user enters the details on a form which will then update the delivery table.
Some products will require serial nos and some not. In cases where they need to put in the serial no., instead of having one entry with del.no, qty, order no etc.., I need to create x lines (x being the qty) with the same info but qty of 1 and a serial no. So as far as I can see I still maintain my one-to-many relationship between order and delivery.
I hope this makes sense...any ideas?
Farrah
 
Yes you could use the rsAddNew method, I'm sure there have been examples posted here, if not or when I get fed up with decorating I'll post an example.
HTH
 

Users who are viewing this thread

Back
Top Bottom