Locate Table

  • Thread starter Thread starter Vaughn
  • Start date Start date
V

Vaughn

Hi,
I need to generate an ID number which will be stored in a
table created in my database. The ID comprises 3Alpha +
3Numeric (two fields)contained in this table created.
How do I reference this table in my procedure in order to
work on the data in this table.

Thanks
 
Vaughn

Not sure I understand what the ID has to do with "how do I reference this
table in my procedure"? Also not clear on just what procedure you are
describing.

Depending on what you are trying to do, using what mechanism (code module,
macro, code-behind-form, ...), you can often refer to a table by its name
(e.g., tblPerson).
 
Hi Jeff,
The ID_table ( is a two column table which requires the
first alpha characters of a surname and the second column
will contain the numeric which will be incremented) is
used to store data(ie the ID number that I want to
create). My ID_procedure will generate, maintain, and
store these ID no.
When a new customers is entered into my database, I will
call this procedure to generate a new customer number.
This unique customer ID number will be used as the key
for this customer.
This ID_table is not linked to any control on my form.
This procedure will be called when I need to generate a
customer ID. How do I reference the data in this ID_table
created in my database?
When a database is opened are all objects (eg
forms,tables,etc) opened and wait to be used ?
Thanks
-----Original Message-----
 
Hi Jeff,
The ID_table ( is a two column table which requires the
first alpha characters of a surname and the second column
will contain the numeric which will be incremented) is
used to store data(ie the ID number that I want to
create). My ID_procedure will generate, maintain, and
store these ID no.
When a new customers is entered into my database, I will
call this procedure to generate a new customer number.
This unique customer ID number will be used as the key
for this customer.
This ID_table is not linked to any control on my form.
This procedure will be called when I need to generate a
customer ID. How do I reference the data in this ID_table
created in my database?
When a database is opened are all objects (eg
forms,tables,etc) opened and wait to be used ?
Thanks
-----Original Message-----
 
Vaughn

Not all objects are available. An unopened form isn't, for example.

A table and it's fields would be accessible via a recordset. You can refer
to this table in your procedure by defining a recordset based on that table.
Or you could create a query that appends a new record to the table, plus a
procedure that generates your ID number.

Out of curiosity, are you planning to have users see or otherwise work with
that ID number? If not, have you considered using the already-available,
automatically-incrementing unique identification number that Access
provides?
 
Thanks Jeff
No user will have direct access to the Id generating
function. The results from this function will be used to
assign a unique key to a new entry in the data base.
I have choosen not to use the auto number generator.
I have just stated using access 2000 and VB5 seriously
and am still finding my feet in this environment. Once I
am profecient I will move on to the newer versions.
Thanks for the input.
 
I have choosen not to use the auto number generator.
I have just stated using access 2000 and VB5 seriously
and am still finding my feet in this environment. Once I
am profecient I will move on to the newer versions.

Just to clarify - Autonumbers have been around since Access 1.0;
they're not a "newer version" feature.

John W. Vinson[MVP]
(no longer chatting for now)
 
Back
Top