Conversion 97-->00 (ODBC problem)

  • Thread starter Thread starter simbra
  • Start date Start date
S

simbra

Guest
Hi everyone!
I have a problem when converting a A97-->A00 and the thing is that I have an update button that works with several linked tables to another Accessdb. The links are OK!

Then I work against 1 datasource (MS ODBC for Oracle). When I open the db I have an AutoExec macro that opens a oracle table so I have to log on to the odbc and then closes it. Then the connection is just fine. I have connections to all of my tables.

But when I am trying to use the update button that starts like this:
Private Sub Kommandoknapp92_Click()
On Error GoTo Err_Kommandoknapp92_Click
Dim quest As String
Dim stDocName As String
Dim testcalc1 As Integer
Dim testcalc2 As Integer

DoCmd.OpenForm "VisaFråga"
Forms![VisaFråga]![App] = "Kontrollerar att kalkyler finns för TO"
testcalc1 = IIf(DLookup("[SA]", "Saknaskalkyl") > 0, 1, 0)
testcalc2 = IIf(DLookup("[SA]", "Saknaskalkyl_T855") > 0, 1, 0)
DoCmd.Close acForm, "VisaFråga"

If testcalc1 > 0 Or testcalc2 > 0 Then
MsgBox "There are several calculations that are not yet ready!"
End
End If

DoCmd.SetWarnings False
Forms![rapportbest3]![Tid] = DLookup("[Now]", "READ_SYSTEMDATE")
'"PIA_kont_FBV"
quest = "PIA_kont_FBV"
DoCmd.OpenForm "VisaFråga"
Forms![VisaFråga]![App] = quest
DoCmd.OpenQuery quest (here it stops and goes to the error handling that says "ODBC connection failed")
DoCmd.Close acForm, "VisaFråga"

When the button "kommandoknapp92" was pressed in A97 you were asked to log on to the odbc but no more. There are only the message "ODBC call failed". I have to mention that this task have been given me without any documentation and I do not know who the creator is. Hopeless?? Or??

Sorry for the long question but I only have you to ask!

BR
Simbra
 
ODBC

A lot of times when you convert - the linked table(s) to ODBC must be relinked in order to work. If this is not done you get the ODBC error message.
 
There is no reason to open and close the form either.
 

Users who are viewing this thread

Back
Top Bottom