Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Table Linking Code Problem

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  can't insert a form into a report  
Author Message
Robin

External


Since: Nov 27, 2008
Posts: 7



(Msg. 1) Posted: Wed Dec 10, 2008 9:08 pm
Post subject: Table Linking Code Problem
Archived from groups: microsoft>public>access (more info?)

I have used a bit of code that would check for the links to a BE datatable
and had replaced it recently because it used the commondialog feature which
became problematic when switching to access 2007. I began using Dev Ashish
fRefreshlinks which works fine when users must specify the location each time
the database is opened. Since this is not convenient I have tried to retain
the AreTablesAttached portion of the previous code to determine if the
fRefreshLinks code is needed. But everytime I change the name of the BE,
outside of Access in windows, to test the Must Locate Datatables feature.
The program just starts and immediately closes. Holding the shift button
down does not stop the autoexec feature. I am at a loss for where to check
next. The code testing the links to determine if the fRefrehlinks code is
required is:

Function AreTablesAttached() As Boolean
' Update connection information in attached tables.
'
' Number of attached tables for progress meter.
Const MAXTABLES = 50
Const NONEXISTENT_TABLE = 3011
Const DB_NOT_FOUND = 3024
Const ACCESS_DENIED = 3051
Const READ_ONLY_DATABASE = 3027

Dim intTableCount As Integer
Dim intResponse As Integer
Dim strFileName As String
Dim strAppDir As String
Dim vntReturnValue As Variant
Dim tdf As TableDef
Dim db As Database
Dim rst As Recordset

Dim strFilter As String
Dim strInputFileName As String

Set db = CurrentDb

' AreTablesAttached = True

' Continue if attachments are broken.
On Error Resume Next
' Open attached table to see if connection information is correct.
Set rst = db.OpenRecordset("InsuranceCompany")
' Exit if connection information is correct.
If Err.Number = 0 Then
AreTablesAttached = True
rst.Close
Exit Function
Else
AreTablesAttached = fRefreshLinks()


rst.Close
Exit Function


End If


End Function

and the AutoExec code is:


Function AutoExec()
On Error GoTo AutoExec_Err:

Dim fAnswer As Boolean
Dim dblStartTime As Double
Dim dblTimeElapsed As Double

'Open splash screen form
DoCmd.OpenForm "frmSplash"
DoEvents
'Invoke hourglass
DoCmd.Hourglass True
'Call routine that checks if tables are properly attached
fAnswer = AreTablesAttached()

'Test return value and proceed only if tables were
'successfully attached
If Not fAnswer Then
'fRefreshLinks
MsgBox "You Cannot Run This App Without Locating Data Tables"
DoCmd.Close acForm, "frmSplash"
'DoCmd.Close acForm, "frmGetTables"
Exit Function
End If
'Call GetCompanyInfo
DoCmd.Hourglass False
DoCmd.OpenForm "SwitchBoard"
DoCmd.Maximize
'If splash screen is still loaded, unload it
If IsLoaded("frmSplash") Then
DoCmd.Close acForm, "frmSplash"
End If
Exit Function

AutoExec_Err:
MsgBox "Error # " & Err.Number & ": " & Err.Description
Exit Function
End Function


So the only way to make any tests are to rename the BE back to what was
previously linked. This has me stumped tremendously. Any thoughts would be
appreciated.

Thank you,
Robin

 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
a a r o n _ k e m p f

External


Since: Dec 11, 2008
Posts: 5



(Msg. 2) Posted: Thu Dec 11, 2008 1:06 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

wow-- that's just fantastic

In other words- you think that this whole backend thing is 'too
complex'.
That's funny-- I do also.

I personally choose to use a real database-- like SQL Server for
example-- because i can keep all my tables, queries in one place; and
I can change these while people are using the application.
Meanwhile, you're stuck maintaining obsolete DAO code??!!??

you shoud upsize to SQL Server and stop listening to these dorks
and stop using code off the internet just because some random dude
tells you to





On Dec 10, 9:08 pm, Robin wrote:
> I have used a bit of code that would check for the links to a BE datatable
> and had replaced it recently because it used the commondialog feature which
> became problematic when switching to access 2007.  I began using Dev Ashish
> fRefreshlinks which works fine when users must specify the location each time
> the database is opened.  Since this is not convenient I have tried to retain
> the AreTablesAttached portion of the previous code to determine if the
> fRefreshLinks code is needed.  But everytime I change the name of the BE,
> outside of Access in windows, to test the Must Locate Datatables feature.  
> The program just starts and immediately closes.  Holding the shift button
> down does not stop the autoexec feature.  I am at a loss for where to check
> next.  The code testing the links to determine if the fRefrehlinks code is
> required is:
>
> Function AreTablesAttached() As Boolean
>     '  Update connection information in attached tables.
>     '
>     '  Number of attached tables for progress meter.
>     Const MAXTABLES = 50
>     Const NONEXISTENT_TABLE = 3011
>     Const DB_NOT_FOUND = 3024
>     Const ACCESS_DENIED = 3051
>     Const READ_ONLY_DATABASE = 3027
>
>     Dim intTableCount As Integer
>     Dim intResponse As Integer
>     Dim strFileName As String
>     Dim strAppDir As String
>     Dim vntReturnValue As Variant
>     Dim tdf As TableDef
>     Dim db As Database
>     Dim rst As Recordset
>
>     Dim strFilter As String
>     Dim strInputFileName As String
>
>     Set db = CurrentDb
>
>    ' AreTablesAttached = True
>
>     '  Continue if attachments are broken.
>     On Error Resume Next
>     '  Open attached table to see if connection information is correct.
>     Set rst = db.OpenRecordset("InsuranceCompany")
>     '  Exit if connection information is correct.
>     If Err.Number = 0 Then
>     AreTablesAttached = True
>       rst.Close
>       Exit Function
>     Else
>       AreTablesAttached = fRefreshLinks()
>
>       rst.Close
>       Exit Function
>
>     End If
>
> End Function  
>
> and the AutoExec code is:
>
> Function AutoExec()
>    On Error GoTo AutoExec_Err:
>
>    Dim fAnswer As Boolean
>    Dim dblStartTime As Double
>    Dim dblTimeElapsed As Double
>
>    'Open splash screen form
>    DoCmd.OpenForm "frmSplash"
>    DoEvents
>    'Invoke hourglass
>    DoCmd.Hourglass True
>    'Call routine that checks if tables are properly attached
>    fAnswer = AreTablesAttached()
>
>    'Test return value and proceed only if tables were
>    'successfully attached
>    If Not fAnswer Then
>       'fRefreshLinks
>       MsgBox "You Cannot Run This App Without Locating Data Tables"
>       DoCmd.Close acForm, "frmSplash"
>       'DoCmd.Close acForm, "frmGetTables"
>       Exit Function
>    End If
>    'Call GetCompanyInfo
>    DoCmd.Hourglass False
>    DoCmd.OpenForm "SwitchBoard"
>    DoCmd.Maximize
>    'If splash screen is still loaded, unload it
>    If IsLoaded("frmSplash") Then
>       DoCmd.Close acForm, "frmSplash"
>    End If
>    Exit Function
>
> AutoExec_Err:
>       MsgBox "Error # " & Err.Number & ": " & Err.Description
>       Exit Function
> End Function
>
> So the only way to make any tests are to rename the BE back to what was
> previously linked.  This has me stumped tremendously.  Any thoughts would be
> appreciated.
>
> Thank you,
> Robin

 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
BruceM

External


Since: Dec 5, 2008
Posts: 31



(Msg. 3) Posted: Thu Dec 11, 2008 7:21 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

So the OP should listen to one random dude only (you) while ignoring the
rest? Considering that despite your contention DAO is not obsolete, other
information you provide must be regarded with some skepticism.

"a a r o n _ k e m p f" wrote in message

wow-- that's just fantastic

In other words- you think that this whole backend thing is 'too
complex'.
That's funny-- I do also.

I personally choose to use a real database-- like SQL Server for
example-- because i can keep all my tables, queries in one place; and
I can change these while people are using the application.
Meanwhile, you're stuck maintaining obsolete DAO code??!!??

you shoud upsize to SQL Server and stop listening to these dorks
and stop using code off the internet just because some random dude
tells you to





On Dec 10, 9:08 pm, Robin wrote:
> I have used a bit of code that would check for the links to a BE datatable
> and had replaced it recently because it used the commondialog feature
> which
> became problematic when switching to access 2007. I began using Dev Ashish
> fRefreshlinks which works fine when users must specify the location each
> time
> the database is opened. Since this is not convenient I have tried to
> retain
> the AreTablesAttached portion of the previous code to determine if the
> fRefreshLinks code is needed. But everytime I change the name of the BE,
> outside of Access in windows, to test the Must Locate Datatables feature.
> The program just starts and immediately closes. Holding the shift button
> down does not stop the autoexec feature. I am at a loss for where to check
> next. The code testing the links to determine if the fRefrehlinks code is
> required is:
>
> Function AreTablesAttached() As Boolean
> ' Update connection information in attached tables.
> '
> ' Number of attached tables for progress meter.
> Const MAXTABLES = 50
> Const NONEXISTENT_TABLE = 3011
> Const DB_NOT_FOUND = 3024
> Const ACCESS_DENIED = 3051
> Const READ_ONLY_DATABASE = 3027
>
> Dim intTableCount As Integer
> Dim intResponse As Integer
> Dim strFileName As String
> Dim strAppDir As String
> Dim vntReturnValue As Variant
> Dim tdf As TableDef
> Dim db As Database
> Dim rst As Recordset
>
> Dim strFilter As String
> Dim strInputFileName As String
>
> Set db = CurrentDb
>
> ' AreTablesAttached = True
>
> ' Continue if attachments are broken.
> On Error Resume Next
> ' Open attached table to see if connection information is correct.
> Set rst = db.OpenRecordset("InsuranceCompany")
> ' Exit if connection information is correct.
> If Err.Number = 0 Then
> AreTablesAttached = True
> rst.Close
> Exit Function
> Else
> AreTablesAttached = fRefreshLinks()
>
> rst.Close
> Exit Function
>
> End If
>
> End Function
>
> and the AutoExec code is:
>
> Function AutoExec()
> On Error GoTo AutoExec_Err:
>
> Dim fAnswer As Boolean
> Dim dblStartTime As Double
> Dim dblTimeElapsed As Double
>
> 'Open splash screen form
> DoCmd.OpenForm "frmSplash"
> DoEvents
> 'Invoke hourglass
> DoCmd.Hourglass True
> 'Call routine that checks if tables are properly attached
> fAnswer = AreTablesAttached()
>
> 'Test return value and proceed only if tables were
> 'successfully attached
> If Not fAnswer Then
> 'fRefreshLinks
> MsgBox "You Cannot Run This App Without Locating Data Tables"
> DoCmd.Close acForm, "frmSplash"
> 'DoCmd.Close acForm, "frmGetTables"
> Exit Function
> End If
> 'Call GetCompanyInfo
> DoCmd.Hourglass False
> DoCmd.OpenForm "SwitchBoard"
> DoCmd.Maximize
> 'If splash screen is still loaded, unload it
> If IsLoaded("frmSplash") Then
> DoCmd.Close acForm, "frmSplash"
> End If
> Exit Function
>
> AutoExec_Err:
> MsgBox "Error # " & Err.Number & ": " & Err.Description
> Exit Function
> End Function
>
> So the only way to make any tests are to rename the BE back to what was
> previously linked. This has me stumped tremendously. Any thoughts would be
> appreciated.
>
> Thank you,
> Robin
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
Peter Hibbs

External


Since: Dec 11, 2008
Posts: 1



(Msg. 4) Posted: Thu Dec 11, 2008 10:09 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

Robin,

What I do is create a small text file in the same folder as the FE
which holds the pathname to the BE, the re-link code in the FE file
then uses this to re-establish the links when a new FE is provided.
This means that the relinking is done automatically without the user
having to do anything. You may need to modify it slightly to add your
splash screen code though.

See [URL="http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184"]http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184[/URL]
for an example.

HTH

Peter Hibbs.

On Wed, 10 Dec 2008 21:08:01 -0800, Robin
wrote:

>I have used a bit of code that would check for the links to a BE datatable
>and had replaced it recently because it used the commondialog feature which
>became problematic when switching to access 2007. I began using Dev Ashish
>fRefreshlinks which works fine when users must specify the location each time
>the database is opened. Since this is not convenient I have tried to retain
>the AreTablesAttached portion of the previous code to determine if the
>fRefreshLinks code is needed. But everytime I change the name of the BE,
>outside of Access in windows, to test the Must Locate Datatables feature.
>The program just starts and immediately closes. Holding the shift button
>down does not stop the autoexec feature. I am at a loss for where to check
>next. The code testing the links to determine if the fRefrehlinks code is
>required is:
>
>Function AreTablesAttached() As Boolean
> ' Update connection information in attached tables.
> '
> ' Number of attached tables for progress meter.
> Const MAXTABLES = 50
> Const NONEXISTENT_TABLE = 3011
> Const DB_NOT_FOUND = 3024
> Const ACCESS_DENIED = 3051
> Const READ_ONLY_DATABASE = 3027
>
> Dim intTableCount As Integer
> Dim intResponse As Integer
> Dim strFileName As String
> Dim strAppDir As String
> Dim vntReturnValue As Variant
> Dim tdf As TableDef
> Dim db As Database
> Dim rst As Recordset
>
> Dim strFilter As String
> Dim strInputFileName As String
>
> Set db = CurrentDb
>
> ' AreTablesAttached = True
>
> ' Continue if attachments are broken.
> On Error Resume Next
> ' Open attached table to see if connection information is correct.
> Set rst = db.OpenRecordset("InsuranceCompany")
> ' Exit if connection information is correct.
> If Err.Number = 0 Then
> AreTablesAttached = True
> rst.Close
> Exit Function
> Else
> AreTablesAttached = fRefreshLinks()
>
>
> rst.Close
> Exit Function
>
>
> End If
>
>
>End Function
>
>and the AutoExec code is:
>
>
>Function AutoExec()
> On Error GoTo AutoExec_Err:
>
> Dim fAnswer As Boolean
> Dim dblStartTime As Double
> Dim dblTimeElapsed As Double
>
> 'Open splash screen form
> DoCmd.OpenForm "frmSplash"
> DoEvents
> 'Invoke hourglass
> DoCmd.Hourglass True
> 'Call routine that checks if tables are properly attached
> fAnswer = AreTablesAttached()
>
> 'Test return value and proceed only if tables were
> 'successfully attached
> If Not fAnswer Then
> 'fRefreshLinks
> MsgBox "You Cannot Run This App Without Locating Data Tables"
> DoCmd.Close acForm, "frmSplash"
> 'DoCmd.Close acForm, "frmGetTables"
> Exit Function
> End If
> 'Call GetCompanyInfo
> DoCmd.Hourglass False
> DoCmd.OpenForm "SwitchBoard"
> DoCmd.Maximize
> 'If splash screen is still loaded, unload it
> If IsLoaded("frmSplash") Then
> DoCmd.Close acForm, "frmSplash"
> End If
> Exit Function
>
>AutoExec_Err:
> MsgBox "Error # " & Err.Number & ": " & Err.Description
> Exit Function
>End Function
>
>
>So the only way to make any tests are to rename the BE back to what was
>previously linked. This has me stumped tremendously. Any thoughts would be
>appreciated.
>
>Thank you,
>Robin
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
Robin

External


Since: Nov 27, 2008
Posts: 7



(Msg. 5) Posted: Thu Dec 11, 2008 10:14 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

Thanks for pointing me in the right direction. I can see that the Checklinks
piece is a better solution than what I currently have. I'll see what luck I
have with the adaptation.

Thank you so much,

Robin



"Peter Hibbs" wrote:

> Robin,
>
> What I do is create a small text file in the same folder as the FE
> which holds the pathname to the BE, the re-link code in the FE file
> then uses this to re-establish the links when a new FE is provided.
> This means that the relinking is done automatically without the user
> having to do anything. You may need to modify it slightly to add your
> splash screen code though.
>
> See [URL="http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184"]http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184[/URL]
> for an example.
>
> HTH
>
> Peter Hibbs.
>
> On Wed, 10 Dec 2008 21:08:01 -0800, Robin
> wrote:
>
> >I have used a bit of code that would check for the links to a BE datatable
> >and had replaced it recently because it used the commondialog feature which
> >became problematic when switching to access 2007. I began using Dev Ashish
> >fRefreshlinks which works fine when users must specify the location each time
> >the database is opened. Since this is not convenient I have tried to retain
> >the AreTablesAttached portion of the previous code to determine if the
> >fRefreshLinks code is needed. But everytime I change the name of the BE,
> >outside of Access in windows, to test the Must Locate Datatables feature.
> >The program just starts and immediately closes. Holding the shift button
> >down does not stop the autoexec feature. I am at a loss for where to check
> >next. The code testing the links to determine if the fRefrehlinks code is
> >required is:
> >
> >Function AreTablesAttached() As Boolean
> > ' Update connection information in attached tables.
> > '
> > ' Number of attached tables for progress meter.
> > Const MAXTABLES = 50
> > Const NONEXISTENT_TABLE = 3011
> > Const DB_NOT_FOUND = 3024
> > Const ACCESS_DENIED = 3051
> > Const READ_ONLY_DATABASE = 3027
> >
> > Dim intTableCount As Integer
> > Dim intResponse As Integer
> > Dim strFileName As String
> > Dim strAppDir As String
> > Dim vntReturnValue As Variant
> > Dim tdf As TableDef
> > Dim db As Database
> > Dim rst As Recordset
> >
> > Dim strFilter As String
> > Dim strInputFileName As String
> >
> > Set db = CurrentDb
> >
> > ' AreTablesAttached = True
> >
> > ' Continue if attachments are broken.
> > On Error Resume Next
> > ' Open attached table to see if connection information is correct.
> > Set rst = db.OpenRecordset("InsuranceCompany")
> > ' Exit if connection information is correct.
> > If Err.Number = 0 Then
> > AreTablesAttached = True
> > rst.Close
> > Exit Function
> > Else
> > AreTablesAttached = fRefreshLinks()
> >
> >
> > rst.Close
> > Exit Function
> >
> >
> > End If
> >
> >
> >End Function
> >
> >and the AutoExec code is:
> >
> >
> >Function AutoExec()
> > On Error GoTo AutoExec_Err:
> >
> > Dim fAnswer As Boolean
> > Dim dblStartTime As Double
> > Dim dblTimeElapsed As Double
> >
> > 'Open splash screen form
> > DoCmd.OpenForm "frmSplash"
> > DoEvents
> > 'Invoke hourglass
> > DoCmd.Hourglass True
> > 'Call routine that checks if tables are properly attached
> > fAnswer = AreTablesAttached()
> >
> > 'Test return value and proceed only if tables were
> > 'successfully attached
> > If Not fAnswer Then
> > 'fRefreshLinks
> > MsgBox "You Cannot Run This App Without Locating Data Tables"
> > DoCmd.Close acForm, "frmSplash"
> > 'DoCmd.Close acForm, "frmGetTables"
> > Exit Function
> > End If
> > 'Call GetCompanyInfo
> > DoCmd.Hourglass False
> > DoCmd.OpenForm "SwitchBoard"
> > DoCmd.Maximize
> > 'If splash screen is still loaded, unload it
> > If IsLoaded("frmSplash") Then
> > DoCmd.Close acForm, "frmSplash"
> > End If
> > Exit Function
> >
> >AutoExec_Err:
> > MsgBox "Error # " & Err.Number & ": " & Err.Description
> > Exit Function
> >End Function
> >
> >
> >So the only way to make any tests are to rename the BE back to what was
> >previously linked. This has me stumped tremendously. Any thoughts would be
> >appreciated.
> >
> >Thank you,
> >Robin
>
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
Robin

External


Since: Nov 27, 2008
Posts: 7



(Msg. 6) Posted: Sat Dec 13, 2008 7:30 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

While the code that I replaced is more efficient than what I was using
previously. Thank you again.

The real problem was that since I created a custom ribbon in my access 2007
database and had it stored in the Back End datatable. When the BE could not
be found Access failed before the AutoExec code could run. Which is what
created the Front End not to open at all, shift key depressed or otherwise.

Thank you,
Robin

"Robin" wrote:

> Thanks for pointing me in the right direction. I can see that the Checklinks
> piece is a better solution than what I currently have. I'll see what luck I
> have with the adaptation.
>
> Thank you so much,
>
> Robin
>
>
>
> "Peter Hibbs" wrote:
>
> > Robin,
> >
> > What I do is create a small text file in the same folder as the FE
> > which holds the pathname to the BE, the re-link code in the FE file
> > then uses this to re-establish the links when a new FE is provided.
> > This means that the relinking is done automatically without the user
> > having to do anything. You may need to modify it slightly to add your
> > splash screen code though.
> >
> > See [URL="http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184"]http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=184[/URL]
> > for an example.
> >
> > HTH
> >
> > Peter Hibbs.
> >
> > On Wed, 10 Dec 2008 21:08:01 -0800, Robin
> > wrote:
> >
> > >I have used a bit of code that would check for the links to a BE datatable
> > >and had replaced it recently because it used the commondialog feature which
> > >became problematic when switching to access 2007. I began using Dev Ashish
> > >fRefreshlinks which works fine when users must specify the location each time
> > >the database is opened. Since this is not convenient I have tried to retain
> > >the AreTablesAttached portion of the previous code to determine if the
> > >fRefreshLinks code is needed. But everytime I change the name of the BE,
> > >outside of Access in windows, to test the Must Locate Datatables feature.
> > >The program just starts and immediately closes. Holding the shift button
> > >down does not stop the autoexec feature. I am at a loss for where to check
> > >next. The code testing the links to determine if the fRefrehlinks code is
> > >required is:
> > >
> > >Function AreTablesAttached() As Boolean
> > > ' Update connection information in attached tables.
> > > '
> > > ' Number of attached tables for progress meter.
> > > Const MAXTABLES = 50
> > > Const NONEXISTENT_TABLE = 3011
> > > Const DB_NOT_FOUND = 3024
> > > Const ACCESS_DENIED = 3051
> > > Const READ_ONLY_DATABASE = 3027
> > >
> > > Dim intTableCount As Integer
> > > Dim intResponse As Integer
> > > Dim strFileName As String
> > > Dim strAppDir As String
> > > Dim vntReturnValue As Variant
> > > Dim tdf As TableDef
> > > Dim db As Database
> > > Dim rst As Recordset
> > >
> > > Dim strFilter As String
> > > Dim strInputFileName As String
> > >
> > > Set db = CurrentDb
> > >
> > > ' AreTablesAttached = True
> > >
> > > ' Continue if attachments are broken.
> > > On Error Resume Next
> > > ' Open attached table to see if connection information is correct.
> > > Set rst = db.OpenRecordset("InsuranceCompany")
> > > ' Exit if connection information is correct.
> > > If Err.Number = 0 Then
> > > AreTablesAttached = True
> > > rst.Close
> > > Exit Function
> > > Else
> > > AreTablesAttached = fRefreshLinks()
> > >
> > >
> > > rst.Close
> > > Exit Function
> > >
> > >
> > > End If
> > >
> > >
> > >End Function
> > >
> > >and the AutoExec code is:
> > >
> > >
> > >Function AutoExec()
> > > On Error GoTo AutoExec_Err:
> > >
> > > Dim fAnswer As Boolean
> > > Dim dblStartTime As Double
> > > Dim dblTimeElapsed As Double
> > >
> > > 'Open splash screen form
> > > DoCmd.OpenForm "frmSplash"
> > > DoEvents
> > > 'Invoke hourglass
> > > DoCmd.Hourglass True
> > > 'Call routine that checks if tables are properly attached
> > > fAnswer = AreTablesAttached()
> > >
> > > 'Test return value and proceed only if tables were
> > > 'successfully attached
> > > If Not fAnswer Then
> > > 'fRefreshLinks
> > > MsgBox "You Cannot Run This App Without Locating Data Tables"
> > > DoCmd.Close acForm, "frmSplash"
> > > 'DoCmd.Close acForm, "frmGetTables"
> > > Exit Function
> > > End If
> > > 'Call GetCompanyInfo
> > > DoCmd.Hourglass False
> > > DoCmd.OpenForm "SwitchBoard"
> > > DoCmd.Maximize
> > > 'If splash screen is still loaded, unload it
> > > If IsLoaded("frmSplash") Then
> > > DoCmd.Close acForm, "frmSplash"
> > > End If
> > > Exit Function
> > >
> > >AutoExec_Err:
> > > MsgBox "Error # " & Err.Number & ": " & Err.Description
> > > Exit Function
> > >End Function
> > >
> > >
> > >So the only way to make any tests are to rename the BE back to what was
> > >previously linked. This has me stumped tremendously. Any thoughts would be
> > >appreciated.
> > >
> > >Thank you,
> > >Robin
> >
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
a a r o n _ k e m p f

External


Since: Dec 11, 2008
Posts: 5



(Msg. 7) Posted: Sun Dec 21, 2008 4:51 pm
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

Re:
So the OP should listen to one random dude only (you) while ignoring
the
rest? Considering that despite your contention DAO is not obsolete,
other
information you provide must be regarded with some skepticism.

YES, THE OP SHOULD LISTEN TO ME, THE ONLY CERTIFIED IT PROFESSIONAL IN
THIS GROUP





On Dec 11, 4:21 am, "BruceM" wrote:
> So the OP should listen to one random dude only (you) while ignoring the
> rest?  Considering that despite your contention DAO is not obsolete, other
> information you provide must be regarded with some skepticism.
>
> "a a r o n _ k e m p f" wrote in message
> wow-- that's just fantastic
>
> In other words- you think that this whole backend thing is 'too
> complex'.
> That's funny-- I do also.
>
> I personally choose to use a real database-- like SQL Server for
> example-- because i can keep all my tables, queries in one place; and
> I can change these while people are using the application.
> Meanwhile, you're stuck maintaining obsolete DAO code??!!??
>
> you shoud upsize to SQL Server and stop listening to these dorks
> and stop using code off the internet just because some random dude
> tells you to
>
> On Dec 10, 9:08 pm, Robin wrote:
>
>
>
> > I have used a bit of code that would check for the links to a BE datatable
> > and had replaced it recently because it used the commondialog feature
> > which
> > became problematic when switching to access 2007. I began using Dev Ashish
> > fRefreshlinks which works fine when users must specify the location each
> > time
> > the database is opened. Since this is not convenient I have tried to
> > retain
> > the AreTablesAttached portion of the previous code to determine if the
> > fRefreshLinks code is needed. But everytime I change the name of the BE,
> > outside of Access in windows, to test the Must Locate Datatables feature.
> > The program just starts and immediately closes. Holding the shift button
> > down does not stop the autoexec feature. I am at a loss for where to check
> > next. The code testing the links to determine if the fRefrehlinks code is
> > required is:
>
> > Function AreTablesAttached() As Boolean
> > ' Update connection information in attached tables.
> > '
> > ' Number of attached tables for progress meter.
> > Const MAXTABLES = 50
> > Const NONEXISTENT_TABLE = 3011
> > Const DB_NOT_FOUND = 3024
> > Const ACCESS_DENIED = 3051
> > Const READ_ONLY_DATABASE = 3027
>
> > Dim intTableCount As Integer
> > Dim intResponse As Integer
> > Dim strFileName As String
> > Dim strAppDir As String
> > Dim vntReturnValue As Variant
> > Dim tdf As TableDef
> > Dim db As Database
> > Dim rst As Recordset
>
> > Dim strFilter As String
> > Dim strInputFileName As String
>
> > Set db = CurrentDb
>
> > ' AreTablesAttached = True
>
> > ' Continue if attachments are broken.
> > On Error Resume Next
> > ' Open attached table to see if connection information is correct.
> > Set rst = db.OpenRecordset("InsuranceCompany")
> > ' Exit if connection information is correct.
> > If Err.Number = 0 Then
> > AreTablesAttached = True
> > rst.Close
> > Exit Function
> > Else
> > AreTablesAttached = fRefreshLinks()
>
> > rst.Close
> > Exit Function
>
> > End If
>
> > End Function
>
> > and the AutoExec code is:
>
> > Function AutoExec()
> > On Error GoTo AutoExec_Err:
>
> > Dim fAnswer As Boolean
> > Dim dblStartTime As Double
> > Dim dblTimeElapsed As Double
>
> > 'Open splash screen form
> > DoCmd.OpenForm "frmSplash"
> > DoEvents
> > 'Invoke hourglass
> > DoCmd.Hourglass True
> > 'Call routine that checks if tables are properly attached
> > fAnswer = AreTablesAttached()
>
> > 'Test return value and proceed only if tables were
> > 'successfully attached
> > If Not fAnswer Then
> > 'fRefreshLinks
> > MsgBox "You Cannot Run This App Without Locating Data Tables"
> > DoCmd.Close acForm, "frmSplash"
> > 'DoCmd.Close acForm, "frmGetTables"
> > Exit Function
> > End If
> > 'Call GetCompanyInfo
> > DoCmd.Hourglass False
> > DoCmd.OpenForm "SwitchBoard"
> > DoCmd.Maximize
> > 'If splash screen is still loaded, unload it
> > If IsLoaded("frmSplash") Then
> > DoCmd.Close acForm, "frmSplash"
> > End If
> > Exit Function
>
> > AutoExec_Err:
> > MsgBox "Error # " & Err.Number & ": " & Err.Description
> > Exit Function
> > End Function
>
> > So the only way to make any tests are to rename the BE back to what was
> > previously linked. This has me stumped tremendously. Any thoughts would be
> > appreciated.
>
> > Thank you,
> > Robin- Hide quoted text -
>
> - Show quoted text -
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
BruceM

External


Since: Dec 5, 2008
Posts: 31



(Msg. 8) Posted: Mon Dec 22, 2008 7:30 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

Certified I can believe, but not as an IT Professional.

"a a r o n _ k e m p f" wrote in message

Re:
So the OP should listen to one random dude only (you) while ignoring
the
rest? Considering that despite your contention DAO is not obsolete,
other
information you provide must be regarded with some skepticism.

YES, THE OP SHOULD LISTEN TO ME, THE ONLY CERTIFIED IT PROFESSIONAL IN
THIS GROUP





On Dec 11, 4:21 am, "BruceM" wrote:
> So the OP should listen to one random dude only (you) while ignoring the
> rest? Considering that despite your contention DAO is not obsolete, other
> information you provide must be regarded with some skepticism.
>
> "a a r o n _ k e m p f" wrote in
> message
> wow-- that's just fantastic
>
> In other words- you think that this whole backend thing is 'too
> complex'.
> That's funny-- I do also.
>
> I personally choose to use a real database-- like SQL Server for
> example-- because i can keep all my tables, queries in one place; and
> I can change these while people are using the application.
> Meanwhile, you're stuck maintaining obsolete DAO code??!!??
>
> you shoud upsize to SQL Server and stop listening to these dorks
> and stop using code off the internet just because some random dude
> tells you to
>
> On Dec 10, 9:08 pm, Robin wrote:
>
>
>
> > I have used a bit of code that would check for the links to a BE
> > datatable
> > and had replaced it recently because it used the commondialog feature
> > which
> > became problematic when switching to access 2007. I began using Dev
> > Ashish
> > fRefreshlinks which works fine when users must specify the location each
> > time
> > the database is opened. Since this is not convenient I have tried to
> > retain
> > the AreTablesAttached portion of the previous code to determine if the
> > fRefreshLinks code is needed. But everytime I change the name of the BE,
> > outside of Access in windows, to test the Must Locate Datatables
> > feature.
> > The program just starts and immediately closes. Holding the shift button
> > down does not stop the autoexec feature. I am at a loss for where to
> > check
> > next. The code testing the links to determine if the fRefrehlinks code
> > is
> > required is:
>
> > Function AreTablesAttached() As Boolean
> > ' Update connection information in attached tables.
> > '
> > ' Number of attached tables for progress meter.
> > Const MAXTABLES = 50
> > Const NONEXISTENT_TABLE = 3011
> > Const DB_NOT_FOUND = 3024
> > Const ACCESS_DENIED = 3051
> > Const READ_ONLY_DATABASE = 3027
>
> > Dim intTableCount As Integer
> > Dim intResponse As Integer
> > Dim strFileName As String
> > Dim strAppDir As String
> > Dim vntReturnValue As Variant
> > Dim tdf As TableDef
> > Dim db As Database
> > Dim rst As Recordset
>
> > Dim strFilter As String
> > Dim strInputFileName As String
>
> > Set db = CurrentDb
>
> > ' AreTablesAttached = True
>
> > ' Continue if attachments are broken.
> > On Error Resume Next
> > ' Open attached table to see if connection information is correct.
> > Set rst = db.OpenRecordset("InsuranceCompany")
> > ' Exit if connection information is correct.
> > If Err.Number = 0 Then
> > AreTablesAttached = True
> > rst.Close
> > Exit Function
> > Else
> > AreTablesAttached = fRefreshLinks()
>
> > rst.Close
> > Exit Function
>
> > End If
>
> > End Function
>
> > and the AutoExec code is:
>
> > Function AutoExec()
> > On Error GoTo AutoExec_Err:
>
> > Dim fAnswer As Boolean
> > Dim dblStartTime As Double
> > Dim dblTimeElapsed As Double
>
> > 'Open splash screen form
> > DoCmd.OpenForm "frmSplash"
> > DoEvents
> > 'Invoke hourglass
> > DoCmd.Hourglass True
> > 'Call routine that checks if tables are properly attached
> > fAnswer = AreTablesAttached()
>
> > 'Test return value and proceed only if tables were
> > 'successfully attached
> > If Not fAnswer Then
> > 'fRefreshLinks
> > MsgBox "You Cannot Run This App Without Locating Data Tables"
> > DoCmd.Close acForm, "frmSplash"
> > 'DoCmd.Close acForm, "frmGetTables"
> > Exit Function
> > End If
> > 'Call GetCompanyInfo
> > DoCmd.Hourglass False
> > DoCmd.OpenForm "SwitchBoard"
> > DoCmd.Maximize
> > 'If splash screen is still loaded, unload it
> > If IsLoaded("frmSplash") Then
> > DoCmd.Close acForm, "frmSplash"
> > End If
> > Exit Function
>
> > AutoExec_Err:
> > MsgBox "Error # " & Err.Number & ": " & Err.Description
> > Exit Function
> > End Function
>
> > So the only way to make any tests are to rename the BE back to what was
> > previously linked. This has me stumped tremendously. Any thoughts would
> > be
> > appreciated.
>
> > Thank you,
> > Robin- Hide quoted text -
>
> - Show quoted text -
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
Robin

External


Since: Nov 27, 2008
Posts: 7



(Msg. 9) Posted: Mon Dec 22, 2008 7:30 am
Post subject: Re: Table Linking Code Problem
Archived from groups: per prev. post (more info?)

I am keeping the SQL option available for future use. Right now it would be
difficult to take advice from some one that was unable to answer my question
or help solve my problem. This is probably why most of us use the opinions
posted here.

Robin

"BruceM" wrote:

> Certified I can believe, but not as an IT Professional.
>
> "a a r o n _ k e m p f" wrote in message

> Re:
> So the OP should listen to one random dude only (you) while ignoring
> the
> rest? Considering that despite your contention DAO is not obsolete,
> other
> information you provide must be regarded with some skepticism.
>
> YES, THE OP SHOULD LISTEN TO ME, THE ONLY CERTIFIED IT PROFESSIONAL IN
> THIS GROUP
>
>
>
>
>
> On Dec 11, 4:21 am, "BruceM" wrote:
> > So the OP should listen to one random dude only (you) while ignoring the
> > rest? Considering that despite your contention DAO is not obsolete, other
> > information you provide must be regarded with some skepticism.
> >
> > "a a r o n _ k e m p f" wrote in
> > message
> > wow-- that's just fantastic
> >
> > In other words- you think that this whole backend thing is 'too
> > complex'.
> > That's funny-- I do also.
> >
> > I personally choose to use a real database-- like SQL Server for
> > example-- because i can keep all my tables, queries in one place; and
> > I can change these while people are using the application.
> > Meanwhile, you're stuck maintaining obsolete DAO code??!!??
> >
> > you shoud upsize to SQL Server and stop listening to these dorks
> > and stop using code off the internet just because some random dude
> > tells you to
> >
> > On Dec 10, 9:08 pm, Robin wrote:
> >
> >
> >
> > > I have used a bit of code that would check for the links to a BE
> > > datatable
> > > and had replaced it recently because it used the commondialog feature
> > > which
> > > became problematic when switching to access 2007. I began using Dev
> > > Ashish
> > > fRefreshlinks which works fine when users must specify the location each
> > > time
> > > the database is opened. Since this is not convenient I have tried to
> > > retain
> > > the AreTablesAttached portion of the previous code to determine if the
> > > fRefreshLinks code is needed. But everytime I change the name of the BE,
> > > outside of Access in windows, to test the Must Locate Datatables
> > > feature.
> > > The program just starts and immediately closes. Holding the shift button
> > > down does not stop the autoexec feature. I am at a loss for where to
> > > check
> > > next. The code testing the links to determine if the fRefrehlinks code
> > > is
> > > required is:
> >
> > > Function AreTablesAttached() As Boolean
> > > ' Update connection information in attached tables.
> > > '
> > > ' Number of attached tables for progress meter.
> > > Const MAXTABLES = 50
> > > Const NONEXISTENT_TABLE = 3011
> > > Const DB_NOT_FOUND = 3024
> > > Const ACCESS_DENIED = 3051
> > > Const READ_ONLY_DATABASE = 3027
> >
> > > Dim intTableCount As Integer
> > > Dim intResponse As Integer
> > > Dim strFileName As String
> > > Dim strAppDir As String
> > > Dim vntReturnValue As Variant
> > > Dim tdf As TableDef
> > > Dim db As Database
> > > Dim rst As Recordset
> >
> > > Dim strFilter As String
> > > Dim strInputFileName As String
> >
> > > Set db = CurrentDb
> >
> > > ' AreTablesAttached = True
> >
> > > ' Continue if attachments are broken.
> > > On Error Resume Next
> > > ' Open attached table to see if connection information is correct.
> > > Set rst = db.OpenRecordset("InsuranceCompany")
> > > ' Exit if connection information is correct.
> > > If Err.Number = 0 Then
> > > AreTablesAttached = True
> > > rst.Close
> > > Exit Function
> > > Else
> > > AreTablesAttached = fRefreshLinks()
> >
> > > rst.Close
> > > Exit Function
> >
> > > End If
> >
> > > End Function
> >
> > > and the AutoExec code is:
> >
> > > Function AutoExec()
> > > On Error GoTo AutoExec_Err:
> >
> > > Dim fAnswer As Boolean
> > > Dim dblStartTime As Double
> > > Dim dblTimeElapsed As Double
> >
> > > 'Open splash screen form
> > > DoCmd.OpenForm "frmSplash"
> > > DoEvents
> > > 'Invoke hourglass
> > > DoCmd.Hourglass True
> > > 'Call routine that checks if tables are properly attached
> > > fAnswer = AreTablesAttached()
> >
> > > 'Test return value and proceed only if tables were
> > > 'successfully attached
> > > If Not fAnswer Then
> > > 'fRefreshLinks
> > > MsgBox "You Cannot Run This App Without Locating Data Tables"
> > > DoCmd.Close acForm, "frmSplash"
> > > 'DoCmd.Close acForm, "frmGetTables"
> > > Exit Function
> > > End If
> > > 'Call GetCompanyInfo
> > > DoCmd.Hourglass False
> > > DoCmd.OpenForm "SwitchBoard"
> > > DoCmd.Maximize
> > > 'If splash screen is still loaded, unload it
> > > If IsLoaded("frmSplash") Then
> > > DoCmd.Close acForm, "frmSplash"
> > > End If
> > > Exit Function
> >
> > > AutoExec_Err:
> > > MsgBox "Error # " & Err.Number & ": " & Err.Description
> > > Exit Function
> > > End Function
> >
> > > So the only way to make any tests are to rename the BE back to what was
> > > previously linked. This has me stumped tremendously. Any thoughts would
> > > be
> > > appreciated.
> >
> > > Thank you,
> > > Robin- Hide quoted text -
> >
> > - Show quoted text -
>
>
 >> Stay informed about: Table Linking Code Problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
linking entries to an external file in access? - I'm trying to link an employees file number to their file I have on another drive. Is there a way to do that in access?

swap tables when more than one table is linked to primary .. - I am using office 2007 and have linked a few tables to my primary master table, and is working fine. Only problem is, that now I need to swap back to a previious table that is still linked to the primary table, and i cant seem to find any where on my...

Help with code - Can someone help me with this code. I would like a new case note to be made when the user clicks on the button. However the code I have meshed together keeps bringing up the first record instead of a brand new record. Private Sub newrcd_Click() Dim..

Combo Code Help Please - I am using: Me.filter = "[district name] = """ & Me.combo22 & """" Me.filteron = true to filter a combo for school district. The user can pick a district and projects for that district comes up. If a distr...

Error!! No Code #! - In an AR database, I can go into a customer and view and print invoices and add new ones, but I can not print an aging report, it just comes up with an error but no reference or code number. How can I repair the database so I can run a report?
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]