N
Nigel
I am trying to get a piece of code to check and see if tables are attached, I
have a database and a welcome screen comes up, while this screen is open (it
has no links to any tables) I need it to check and see if certain table is
attached (settings), if the table is attached then I want it to ciontinue on
to the customer form, if not I want it open up another form which will allow
the user to find the data file and reattach the tables.
This is what I am using and it opens the attach form regardless. the msgbox
err statement is just there for debugging purposes to let me know what the
error number is. What is happening is that it opens the attachform regardless
and the error number is 91
Dim dbs As Database, rst As Recordset
Set rst = dbs.OpenRecordset("settings")
If err = 0 Then
DoCmd.openform "customers"
DoCmd.Close "welcome"
Else
MsgBox err
DoCmd.openform "attachtables"
DoCmd.Close "welcome"
End If
any assistance would be greatly appreciated
have a database and a welcome screen comes up, while this screen is open (it
has no links to any tables) I need it to check and see if certain table is
attached (settings), if the table is attached then I want it to ciontinue on
to the customer form, if not I want it open up another form which will allow
the user to find the data file and reattach the tables.
This is what I am using and it opens the attach form regardless. the msgbox
err statement is just there for debugging purposes to let me know what the
error number is. What is happening is that it opens the attachform regardless
and the error number is 91
Dim dbs As Database, rst As Recordset
Set rst = dbs.OpenRecordset("settings")
If err = 0 Then
DoCmd.openform "customers"
DoCmd.Close "welcome"
Else
MsgBox err
DoCmd.openform "attachtables"
DoCmd.Close "welcome"
End If
any assistance would be greatly appreciated