Paula:
I can definitely understand how you feel. I have been an AS/400 programmer/consultant for many years and dove into doing some VB/VBA about 2 years ago. Since you are a beginner, there is an even simpler method of doing the above.
I don't know what version you have, but in Access 2k it's Tools--Database Utilities--Database Splitter. A wizard will walk you through it. I was a little scared of this too, but since my users all ALL remote, this was the only way. It works great. If the data is in the same directory as the program mdb, then the tables should relink automatically. To be safe, you can use the following in a module to look for the data & have an autoexec macro run it:
(I got this either from an Access Book, or a good site like "The Access Web" -- unfortunately, I must have inadvertantly deleted the credits when moving code around, sorry).
Function AutoExec()
On Error GoTo AutoExec_Err:
Dim fAnswer As Boolean
'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
MsgBox "You Cannot Run This App Without Locating Data Tables"
DoCmd.Close acForm, "frmSplash"
DoCmd.Close acForm, "frmGetTables"
End If
DoCmd.Hourglass False
DoCmd.OpenForm "frmMainMenu"
Exit Function
AutoExec_Err:
MsgBox "Error # " & Err.Number & ": " & Err.Description
Exit Function
End Function
Function AreTablesAttached() As Boolean
' Update connection information in attached tables.
'
' Number of attached tables for progress meter.
Const MAXTABLES = 8
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
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("tblCustomers"

' Exit if connection information is correct.
If Err.Number = 0 Then
rst.Close
Exit Function
Else
'Otherwise, determine location of current database
strAppDir = Left(DB.Name, LastOccurrence(DB.Name, "\"

)
'Try to establish the connection searching for the linked
'tables in the same folder as the application database
If TryAgain(strAppDir) Then
rst.Close
Exit Function
End If
'If connection still cannot be established, continue
'Warn the user
MsgBox "You Must Locate the Data Tables"
DoEvents
DoCmd.OpenForm FormName:="frmGetTables", WindowMode:=acHidden
Forms!frmGetTables!dlgCommon.DialogTitle = _
"Please Locate the Database Containing the Data Tables"
Forms!frmGetTables!dlgCommon.ShowOpen
strFileName = Forms!frmGetTables!dlgCommon.Filename
End If
If strFileName = "" Then
GoTo Exit_Failed ' User pressed Cancel.
End If
' Initialize progress meter.
vntReturnValue = SysCmd(SYSCMD_INITMETER, "Attaching tables", MAXTABLES)
' Loop through all tables, reattaching those with
' nonzero-length Connect strings.
intTableCount = 1 ' Initialize TableCount for status meter.
For Each tdf In DB.TableDefs
If tdf.Connect <> "" Then
tdf.Connect = ";DATABASE=" & strFileName
Err.Number = 0
tdf.RefreshLink
If Err.Number <> 0 Then
If Err.Number = NONEXISTENT_TABLE Then
MsgBox "File '" & strFileName & _
"' does not contain required table '" & _
tdf.SourceTableName & "'", 16, "Can't Run This App"
ElseIf Err.Number = DB_NOT_FOUND Then
MsgBox "You can't run FSG Main Application " & vbCrLf & _
"Until you locate Data File", 16, "Can't Run Application"
ElseIf Err.Number = ACCESS_DENIED Then
MsgBox "Couldn't open " & strFileName & _
" because it is read-only or it is located " & _
"on a read-only share.", 16, "Can't Run This App"
ElseIf Err.Number = READ_ONLY_DATABASE Then
MsgBox "Can't reattach tables because Data File " & _
"is read-only or is located on a read-only share.", _
16, "Can't Run This App"
Else
MsgBox Error, 16, "Can't Run This App"
End If
intResponse = MsgBox(tdf.Name & " Not Found. " & _
vbCrLf & "Would You Like to Locate it?", _
vbQuestion + vbYesNo)
If intResponse = vbYes Then
Forms!frmLogon!dlgCommon.DialogTitle = "Please Locate " & _
tdf.Name
Forms!frmLogon!dlgCommon.ShowOpen
strFileName = Forms!frmLogon!dlgCommon.Filename
Else
AreTablesAttached = False
GoTo Exit_Final
End If
End If
intTableCount = intTableCount + 1
vntReturnValue = SysCmd(SYSCMD_UPDATEMETER, intTableCount)
End If
Next tdf
GoTo Exit_Final
Exit_Failed:
MsgBox "You can't run this program until " & _
"you locate Data File", 16, "Can't Run This Program"
AreTablesAttached = False
Exit_Final:
vntReturnValue = SysCmd(SYSCMD_REMOVEMETER)
End Function
Change the table name(s) to match your database.
Good Luck,
Ken Hood