A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using Dmax for more than 2 fields



 
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2009, 07:01 PM posted to microsoft.public.access.forms
ياسر
external usenet poster
 
Posts: 60
Default Using Dmax for more than 2 fields

please help
i have this fields in the form and table:
hiredate , serial,department
i have a command bottom with save option
i want to do this
when i save the current record in the form which is named as Emp
so that to do the following with the save bottom
To sort the current record by hiredate and put serial for the emp i mean
that when i save the record the code looks for the hiredate for this employee
and create a serial for him
i have used this code and it makes serial as well
serial = Nz(DMax("serial", "emp"), 0) + 1
but i need to sort the serial by hiredate
for example
emp has been hired in 1/1/2000
and other is hired in 20/1 2000
so what i need is to do this
when i click on save bottom :
the text named serial to see which emp is before the other in hireddate than
it serial him as number 1for example
and the other as number 2 or higher number
i wish that i have explained my request
So:
please help me



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.