Re: Entering many new records at once

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



http://www.mvps.org/access/bugs/bugs0031.htm is the 'not defined' thing.

The two text boxes are, I'm afraid, something that you really should already
know before you start doing this kind of thing. Do you have someone who
could give you a quick runthrough of Access coding basics?


"ptlm65" <ptlm65.1zc6ln@xxxxxxxxxxxxxxxx> wrote in message
news:ptlm65.1zc6ln@xxxxxxxxxxxxxxxxxxx
>
> How would I set up the two text boxes, one for the start summons number
> and the second for the end summons number?
>
> Also, when I enter the code below after *Private Sub Command6_Click()*
> then i get an error message stating "User-difined type not defined" Can
> anyone help? Thanks
>
> Rob Oldfield Wrote:
> > There would be various ways of doing it, but the first that comes to my
> > mind
> > would be something like...
> >
> > Form with a combo (allowing you to pick an officer's ID), one text box
> > for
> > the '05' prefix, and another two for start and end numbers. A go
> > button
> > would then run something like...
> >
> > dim db as database
> > dim rs as recordset
> > set db=currentdb
> > set rs=db.openrecordset("YourTable")
> > dim i as integer
> > for i=me.StartNum to me.EndNum
> > rs.addnew
> > rs!Officer=me.cboOfficer
> > rs!SummonsNumber=me.prefix+"-"+cstr(i)
> > rs.update
> > next
> > rs.close
> > set db=nothing
> >
> > "ptlm65" <ptlm65.1zbpvm@xxxxxxxxxxxxxxxx> wrote in message
> > news:ptlm65.1zbpvm@xxxxxxxxxxxxxxxxxxx
> > >
> > > I need to create a database where a user can create several new
> > records
> > > at once.
> > >
> > > I work for a police department and they need to have a database for
> > > traffic summons. They need to be able to have one user enter several
> > > summons numbers at one time, that are assigned to one officer.
> > >
> > > for instance, entering Summons #'s 05-1 thru 05-25 assigned to
> > Officer
> > > A. I know I need to create seperate tables for the summons numbers
> > and
> > > the officer's name. Is it possible to enter several summons numbers
> > > automaticaly at once to one particular officer? Like having summons
> > > 05-1 thru 05-25 entered with one click assigned to one officer? Any
> > > help would be great. I have been banging my head over it for a
> > while.
> > > Thanks
> > >
> > >
> > > --
> > > ptlm65Posted from - http://www.officehelp.in
> > >
>
>
> --
> ptlm65Posted from - http://www.officehelp.in
>


.


Quantcast