vba for access

M

mauken

I have a table with entries for the days horse racing, each race has an
identity number. I wish to extract one race at a time to use with other
lookup tables.
In dbase111 it's easy, I set the record pointer and copy wanted number of
runners to new file. This will be my first program for access 2002 so any
advice needs to be very basic.
 
T

Tim Ferguson

I have a table with entries for the days horse racing, each race has an
identity number. I wish to extract one race at a time to use with other
lookup tables.

I'm not really sure what you mean here. If your table is like this:

Entries(RaceNumber, HorseNumber, Handicap, FeePaid...)

then you can make a query like

SELECT ALL RaceNumber, COUNT(HorseNumber)
FROM Entries
GROUP BY RaceNumber
ORDER BY RaceNumber

or, if you only want a list of valid RaceNumbers, it's even easier

SELECT DISTINCT RaceNumber
FROM Entries
ORDER BY RaceNumber

I don't really know how this helps with "other lookup tables" though?

HTH


Tim F
 
D

david epsom dot com dot au

To 'set the record pointer' in VBA, use Seek, FindFirst/FindNext, or
MoveFirst/MoveNext.

In Access, you also have the option of using SQL and/or stored queries
to perform operations like this, instead of using code like dbIII.

When you want to use data from one table with data from other tables,
it is normal to create a query to do that part of the operation.

You can run or use a query from VBA or from a macro.

(david)
 
M

mauken

Thanks for your quick response, your code will achieve what I want.

again much obliged

maurice.
 
M

mauken

I intend to use vba in my programs so your advice is very helpful.

many thanks,

maurice
 

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