[AccessD] Custom Menu In Access - Which One Was Selected

O'Connor, Patricia (OTDA) Patricia.O'Connor at otda.state.ny.us
Thu Jan 31 09:41:50 CST 2008


Depends do you want to return a date or run entire archive
Below is a rough draft
HTH

Function ArchiveData( Mnth_nbr as integer)
   Dim  ArchMth_nbr as integer
   ArchMth_nbr = 3

   If (Mnth_nbr is NULL) Then
       Error Exit function
       or make it 3 months  ArchMth_nbr = 3
   elseif mnth_nbr = 3  or Mnth_nbr = 6 Then
       Archmth_nbr = mnth_nbr
   Else 
      error exit function
      or make it 3 months ArchMth_nbr = 3

   then if using DateAdd("M",ArchMth_nbr, NOW())
    do your thing
   or return the actual date
ArchiveData_Exit:
   EXIT
End function    

**************************************************
* Patricia O'Connor
* Associate Computer Programmer Analyst
* OTDA - BDMA
* (W) mailto:Patricia.O'Connor at otda.state.ny.us
* (w) mailto:aa1160 at nysemail.state.ny.us
**************************************************
 

> 
--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system. 


-----Original Message-----

> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> paul.hartland at fsmail.net
> Sent: Thursday, January 31, 2008 10:16 AM
> To: accessd
> Subject: [AccessD] Custom Menu In Access - Which One Was Selected
> Importance: High
> 
> To all,
> 
> I have a custom menu in Access which allows a user to archive 
> data greater than three months old if not invited for an 
> interview, or greater than six months old if they were 
> invited for an interview.  Basically what I want is both 
> menus to call the same archive function, but pass either the 
> number 3 or number 6 respectively to my archive function.  
> Could someone point me in the right direction to do this please ?
> 
> Thanks in advance for any help on this.
> 
> 
> Paul Hartland
> paul.hartland at fsmail.net
> 07730 523179
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
>





More information about the AccessD mailing list