[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ProgSoc] Another Access Q



I'm not sure you have had a reply but another one won't matter.

On Fri, 12 Apr 2002, Simon Hirshbein wrote:

> > -----Original Message-----
> > From: Jay Banyer [mailto:Jay.Banyer@nospam.jcu.edu.au]
> > Sent: Friday, 12 April 2002 4:56 PM

--- Snip, Snip (throughout) ---

> > Simon Hirshbein wrote:
> > >
> > > Each entry has a enquiry number.  How can I get a form to
> > display the
> > > enquiry number of the PREVIOUS entry?  I suspect I can do
> > it with 'Dlookup',
> > > but am not 100% sure how.
> >
> > The word 'previous' implies a sort order. The sort order should be
> > defined by the recordset you are using, ie table or query.

> Data is kept in a simple table in record number order and
> will stay that way.  Therefore, 'previous' refers to the previous record in
> record number order.  I'd prefer to keep queries out of it if possible.
> Essentially, I want it to be like in Excel where you type =<cell above
> record number of current record>.

You are right that you can use DLookup. It is 

NameOfVariable = DLookup("[FieldToGetValue]", "Table",    & _
		"FieldID = " & CurrentID - 1)

The "& _" is just there if you write it on two lines. Remove it if you put
it on one. 

> Being an engineer (with little interest or skills in database development)
> and designing the database for other engineers and people with even poorer
> computer skills, I'm keeping it really simple (as I hate doing this kind of
> thing anyway). 
You can always hire me :). I'm an engineer who doesn't mind a little part
time programming work.

Cheers,

Chocky


-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.