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 / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Form Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Schlak - 15 Jul 2005 19:38 GMT
I have a form that has three combo boxes' that sorts admin name, Professor
and document type. I have it now to where it uses an rpt and shows the
filtered info.  I now need to find out how to use the same form the three
selections and have it return the filtered info but into a form that will
allow the user to find a specific entry and edit on the fly.  Here is what i
am using to pass the info along for the rpt:

Option Compare Database
Option Explicit
Const strReport = "rptAdminOrderWAll"

Private Sub DoPrintOut(nMethod As Integer)
On Error GoTo Err_DoPrintOut

   If IsNull(Me.Admin_Name) Then
       MsgBox "Please select a Admin Name before trying to print."
   Else
       If IsNull(Me.Prof_Name) Then
           MsgBox "Please select a Professor Name before trying to print."
   Else
       If IsNull(Me.Doc_Type) Then
           MsgBox "Please select a Document type before trying to print."
   Else
       DoCmd.OpenReport strReport, nMethod, , "( AdminID = " &
Me.Admin_Name & " and Professor = " & Me.Prof_Name & " and DocTypeID = " &
Me.Doc_Type & ") "
       Me.SetFocus
       DoCmd.Close
       End If
       End If
   End If

Exit_DoPrintOut:
   Exit Sub

Err_DoPrintOut:
   MsgBox Err.Description
   Resume Exit_DoPrintOut

End Sub

Thanks,
Tony
Steve Schapel - 15 Jul 2005 20:12 GMT
Tony,

It seems to me that you could just use the same sort of procedure,
almost identical except for an OpenForm method in the place of the
OpenReport.  Or have I missed your meaning?

By the way, your code indicates that Admin_Name, Prof_Name, and Doc_Type
are all number data types... is that correct?

Signature

Steve Schapel, Microsoft Access MVP

> I have a form that has three combo boxes' that sorts admin name, Professor
> and document type. I have it now to where it uses an rpt and shows the
[quoted text clipped - 39 lines]
> Thanks,
> Tony
 
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.