adding records based on given numbers

S

Samuel

Hello,

Could somebody tell me how to insert records into an table based on the
numbers given on a form.

Example: I have a form where in a textbox i can give any number, let's say
4. Then in the subform there should be 4 records inserted.

How can i do this?
 
M

Michel Walsh

Hi,


Hoping you have not too many records, the following can do:


... WHERE ("," & parameter & "," ) LIKE ( "*," & FieldName & ",*" )


That is assuming you enter values like: 4,5,101,33

(ie, no space).


That will return (filter) the records where the supplied fieldname hold one
of the supplied value in the parameter.



Use % rather than * if you use MS SQL Server, rather than Jet.


Hoping it may help,
Vanderghast, Access MVP
 

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