Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2008

Tip: Looking for answers? Try searching our database.

Case select & opening macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Naz - 12 Mar 2008 12:11 GMT
Hi

I have 2 questions i need help with

1) How can i get code to run as soon as the database opens, is there an open
datase base event? I know how to get a macro to run i.e. by making it
autoexec but not code in a module

2) How do i do a case select with multiple criteria ....i.e something like

Private Sub Checkname()

SelName = username()

Select Case SelName

   Case "ij34", "mh45","jm56"
        do code
   
   Case "fb56", "fg1", "rt21"
        do code 2
     
   Case Else
        do code 3
   
End Select

End Sub

All help is appreciated.

Signature

_______________________
Naz,
London

Stuart McCall - 12 Mar 2008 12:36 GMT
> Hi
>
[quoted text clipped - 27 lines]
>
> All help is appreciated.

1) Make a function in a standard module called say Startup. Then make an
AutoExec macro with one action: RunCode, specifying your function name like:

Startup()

2) The code you posted looks ok. What's the problem exactly?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.