Knowing the errors would definitely help people...
If the form is bound, then yes, the Load event it too late: try the Open
event instead. Your best bet, though, might be to have an unbound form as
your Startup form, and put the code in it (either Open or Load should work)
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/djsteele
Co-author: "Access 2010 Solutions", published by Wiley
(no e-mails, please!)
"Chris K" <(E-Mail Removed)> wrote in message
news:ESfao.110007$qO1.71499@hurricane...
> I'm using code in a form open event to connect to back end table
>
>
> Private Sub Form_Load()
> Dim tbl As TableDef
> For Each tbl In CurrentDb.TableDefs
> If (tbl.Attributes And dbSystemObject) = 0 _
> Then tbl.Connect = ";DATABASE=" & CurrentProject.path &
> "\JHP_be.mdb": tbl.RefreshLink
> Next
>
> I used this before without a problem but I keep getting errors this time
>
> I cant help wonder whether the code is OK (always was before) and I'm just
> not running it early enough
>
> Is there anyway I can run this code upon start up (not wait until the form
> opens on start up)