ADezii and zmbd,
I have one other question. There seems to be some other code which possibly should reflect the new DAO code. the following does not allow forms to open any longer and files were not moved. I believe the issue is showing the additional string path and view -
-
Private Sub cmdDETAIL_Click()
-
If IsNull([prmEmpNo]) Then
-
MsgBox ("No employee selected.")
-
[prmEmpNo].SetFocus
-
Exit Sub
-
End If
-
ProjectCount = NoOfProjects
-
If ProjectCount <> 0 Then
-
Forms![fPREPROJECT]![fProjectData].SetFocus
-
ProjectCount = NoOfProjects
-
Else
-
MsgBox ("Selection has no records.")
-
Exit Sub
-
End If
-
Select Case prmProjectGroup
-
Case "Complaints"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fComplain01", acNormal, , , acFormEdit
-
Case "Lab"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fComplain01", acNormal, , , acFormEdit
-
Case "ASBESTOS-INSP"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fAsbInsp01", acNormal, , , acFormEdit
-
Case "Inspect-PERM"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fFacInsp01", acNormal, , , acFormEdit
-
Case "Enforcement Cases"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fEnforce01", acNormal, , , acFormEdit
-
Case "Projects"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fProject01", acNormal, , , acFormEdit
-
Case "Permits"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fPermRev01", acNormal, , , acFormEdit
-
Case "Training"
-
If ProjectCount <> 0 Then DoCmd.OpenForm "fTraining01", acNormal, , , acFormEdit
-
Case Else
-
MsgBox ("Type of Project selected does not have detail records.")
-
Exit Sub
-
End Select
-
End Sub
-
-
Private Sub cmdExit_Click()
-
DoCmd.Echo False
-
Me.Visible = False
-
If (SysCmd(acSysCmdGetObjectState, A_FORM, "fAQSplashForm") = 0) Then
-
DoCmd.OpenForm "fAQSplashForm"
-
End If
-
DoCmd.Echo True
-
End Sub
-
-
Private Sub cmdHELP_Click()
-
Call NavigHelp
-
End Sub
-
-
-
Private Sub cmdMemo_Click()
-
-
If [Forms]![fPREPROJECT]![fProjectData].Form.CurrentRecord <> 0 Then
-
glbProjID = [Forms]![fPREPROJECT]![fProjectData].Form![ipProjID]
-
[Forms]![fPREPROJECT]![FormLink1] = [Forms]![fPREPROJECT]![fProjectData].Form![ipProjID]
-
DoCmd.OpenForm "fProjMemoPopup"
-
End If
-
-
-
End Sub
-
-
-
-
Private Sub Form_Activate()
-
'Me![fProjectData].SetFocus
-
'Me![fProjectData].Form![ipProjID].SetFocus
-
' .SelStart = intWhere - 1
-
' .SelLength = Len(strSearch
-
End Sub
-
-
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
-
If KeyCode <> vbKeyF6 Then Exit Sub
-
KeyCode = 0
-
If (SysCmd(acSysCmdGetObjectState, A_FORM, "fAsbFac01") <> 0) Then
-
Forms![fAsbFac01].SetFocus
-
ElseIf (SysCmd(acSysCmdGetObjectState, A_FORM, "fFacDetail01") <> 0) Then
-
Forms![fFacDetail01].SetFocus
-
End If
-
-
End Sub
-
-
Private Sub Form_Open(Cancel As Integer)
-
Dim db As DAO.Database
-
Set db = CurrentDb()
-
'load the Rowsource for [prmEmpNo]
-
'code below performs a query and loads information
-
'from the EMPLOYEE table into the Rowsource
-
Dim EmpInfo As DAO.Recordset
-
Dim i As Integer
-
Dim qte
-
qte = Chr(34)
-
Dim prm As Parameter
-
Dim QD As DAO.QueryDef
-
Set QD = db.QueryDefs("qCmbEmpInfo2")
-
For i = 0 To QD.Parameters.Count - 1
-
Set prm = QD.Parameters(i)
-
prm.Value = Eval(prm.Name)
-
Next i
-
Set EmpInfo = QD.OpenRecordset(dbOpenDynaset)
-
EmpInfo.MoveFirst
-
Do Until EmpInfo.EOF
-
[prmEmpNo].RowSource = [prmEmpNo].RowSource & qte & EmpInfo![EmpInfo] & qte & ";" & qte & EmpInfo![Empl_No] & qte & ";"
-
EmpInfo.MoveNext
-
Loop
-
EmpInfo.Close
-
'this adds an additional entriy at the beginning of Rowsource
-
[prmEmpNo].RowSource = qte & "AllActive" & qte & ";" & qte & "Actv" & qte & ";" & [prmEmpNo].RowSource
-
'this adds additional entries to the end of Rowsource
-
[prmEmpNo].RowSource = [prmEmpNo].RowSource & qte & "TOXICS" & qte & ";" & qte & "tox" & qte & ";"
-
[prmEmpNo].RowSource = [prmEmpNo].RowSource & qte & "STATIONARY SOURCE" & qte & ";" & qte & "cmp" & qte & ";"
-
[prmEmpNo].RowSource = [prmEmpNo].RowSource & qte & "AllEmployees" & qte & ";" & qte & "AllEmployees" & qte & ";"
-
'sets values of startup parameter fields
-
Forms![fPREPROJECT]![prmProjectGroup] = "AllProjects"
-
Forms![fPREPROJECT]![prmOpenClosed] = 2
-
Forms![fPREPROJECT]![prmEmpNo] = "Actv"
-
DoCmd.Maximize
-
Me![fProjectData].SetFocus
-
-
End Sub
-
-
-
-
Private Sub grpOpenClosed_Click()
-
Call ResetParms
-
End Sub
-
-
-
-
Public Function NoOfProjects()
-
NoOfProjects = DCount("*", "qProjectData")
-
End Function
-
-
Private Sub Opt1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Call RedoSort(1)
-
'ME: added September 10, 2008
-
Call RedoSort(1)
-
-
End Sub
-
-
Private Function RedoSort(OptNo As Integer)
-
If Me.[grpOpenClosed] = OptNo Then
-
Forms![fPREPROJECT]![fProjectData].Form.OrderBy = "[SortDate], [Due Date], [Project Description]"
-
End If
-
'ME: 09/03/2008: added the following for the Plan Date sorting-this is a test
-
If OptNo = 5 Then
-
Forms![fPREPROJECT]![fProjectData].Form.OrderBy = "[SortDate], [Plan Date], [Project Description]"
-
End If
-
End Function
-
-
Private Sub Opt2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Call RedoSort(2)
-
'ME: added September 10, 2008
-
Call RedoSort(2)
-
End Sub
-
-
-
-
Private Sub Opt3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Call RedoSort(3)
-
'ME: added September 10, 2008
-
Call RedoSort(3)
-
End Sub
-
-
-
Private Sub Opt4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Call RedoSort(4)
-
'ME: added September 10, 2008
-
Call RedoSort(4)
-
End Sub
-
-
Public Function ResetParms()
-
Call qProjectDataGen(Forms![fPREPROJECT], Forms![fPREPROJECT]![fProjectData].Form)
-
[Forms]![fPREPROJECT]![fProjectData].Requery
-
If [Forms]![fPREPROJECT]![fProjectData].[Form].[CurrentRecord] <> 0 Then
-
Me![fProjectData].SetFocus
-
Me![fProjectData].Form![ipProjID].SetFocus
-
End If
-
End Function
-
-
Private Sub Opt5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Call RedoSort(5)
-
'ME: added September 10, 2008
-
Call RedoSort(5)
-
End Sub
-
-
Private Sub prmEmpNo_Click()
-
Call ResetParms
-
-
End Sub
-
-
Private Sub prmProjectGroup_Click()
-
Call ResetParms
-
-
End Sub
-
-
The OpenForm commands are in lines 16-37 of the code sent.
(Related thread: Macros/VBA created in Access 2003 not working in Access 2013 )
1 1041 ADezii 8,834
Recognized Expert Expert
If prmProjectGroup is an Option Group, then Case Values for - Select Case prmProjectGroup
will be Numeric and not Text.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Susan Bricker |
last post by:
I just purchased a new PC that came with MS Office 2003 (Professional
Ed.). I opened MS Access 2003 and created a new database but it opened
with a "note in the window header bar" that says "Access 2000 File
Format".
1. Why did this happen?
2. Should I delete this database and start again?
3. I am not exactly sure what level of software the end user will be at
(I am creating this database for use by someone else), but I have been...
|
by: Dave |
last post by:
Hi,
I wrote a VBA program to read and process data from an ODBC source and
put it into an Access database. I want to make the program into an MDE
file and run it on systems with Access 2003. So I have to work in
Access 2003 to do this. The problem is that the database that is
created by my program will have to be imported into an application that
only handles Access 97 .mdb file formats. I am wondering if there is
any way to do this....
|
by: DeanL |
last post by:
I know you can convert a database from Access 2003 to 97 easily but is
there anything that I should avoid doing in Access 2003 that might make
my database incompatible with Access 97?
Many thanks, Dean...
|
by: carmela_wong |
last post by:
Hi all,
I have converted a database from Access 2003 to Access 97. Everything
gets neatly imported into the new database except for one form which
continues to show a fatal error when I try to open it in the new 97
database:
"Microsoft Access has encountered a problem and needs to close. We are
sorry for the inconvenience.
If you were in the middle of something, the information you were
|
by: jayohare |
last post by:
Hello,
I have code within my DB application to process credit cards through
authorize.net. Ive been using the same code for several years without a
problem.
I have an order entry computer and after reinstalling Win XP, we used
Office/Access 2003.
When we try to process CC's we get a debug screen and Access itself
crashes.
However, the code still runs fine on Access/Office XP. The debug screen
says: Method 'doSSLPost' of object...
| |
by: Dennis |
last post by:
Greetings.
I want to run the two versions of Access on the same machine (2003 &
2007). I still need 2003 for most of my work, yet I need to start
learning 2007. In my previous attempts at this, right after the
release of 2007, I had problems with the installation dialog running
every time I switched versions. Along with file association issues.
I was hoping to find a work around to this, assuming that 8+ months
later there would be a...
|
by: curran.george |
last post by:
'add one textbox to form1 with Control Source property = ID
'copy/paste the form_load code below:
'Then open the form and then attempt to sort the datasheet
'crashes 2003, error 3450 Access 2007 - I can't find much info on
this... - Can someone explain what's happening and how to fix this?
Private Sub Form_Load()
'2008-01-11
Dim rsx As ADODB.Recordset
Set rsx = New ADODB.Recordset
rsx.CursorLocation = adUseClient
|
by: pballou |
last post by:
The is a simple example of code that worked in access 2003 but does
not in access 2007. I have checked it with the debugger and the
reason is the value of formField1 does not change in ver. 2007 in the
code as the docmd.gotorecord,,acnext moves down the records. But it
does in ver 2003. Any Suggestions?
Example of Table displayed in a continous form with 5 records.
1
1
1
|
by: SUSAN MALAN |
last post by:
I have created a Database in Access 2003 and have now downloaded 2007. I have tried converting it in several ways. I have opened my previous Database and saved it as a 2007 verion -No success, I have created a Blank 2007 DB and imported all the table , Queries , Forms Reports and Macros from the previous version. Although I can see all - The switchboard which is suppose to open immediately only opens with No information. I can only see my...
|
by: msilva100 |
last post by:
Hello,
I need to have remote access to a MS Access 2013 Database running on a Windows 7 Server.
Can someone kindly recommend a remote access tool?
Thank you.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |