Anyone know of dl of a db with nothing in startup + variuos in autoexec?

  • Thread starter Thread starter StargateFanFromWork
  • Start date Start date
S

StargateFanFromWork

Hopefully the code includes the following:

- start switchboard maximized
- starts database window minimized
- opens a form
- opens a "dummy" table (to speed up A2K navigation, etc. I've found out
today that the main table shouldn't be opened but that a workaround table
can be used).

I know it might be a tall order but I'm hoping that's not the case. I've
just googled for the last 40 minutes and, again, nothing useful really comes
up. The Access templates don't have complex coding that I've seen. Also,
since I have Access 2000 only, not able to use the 2003 ones. What has also
happened is that most of the db's I've found today again only show tables
and forms and have no switchboard and no functionality to make data input
easy on the user.

Thanks so much. Appreciate any help anyone can provide. Cheers! :oD
 
Hopefully the code includes the following:

- start switchboard maximized
- starts database window minimized
- opens a form
- opens a "dummy" table (to speed up A2K navigation, etc. I've found out
today that the main table shouldn't be opened but that a workaround table
can be used).

I know it might be a tall order but I'm hoping that's not the case. I've
just googled for the last 40 minutes and, again, nothing useful really comes
up. The Access templates don't have complex coding that I've seen. Also,
since I have Access 2000 only, not able to use the 2003 ones. What has also
happened is that most of the db's I've found today again only show tables
and forms and have no switchboard and no functionality to make data input
easy on the user.

Thanks so much. Appreciate any help anyone can provide. Cheers! :oD

One big question:

Why do you insist on doing this *With a Startup macro*?

It's the hard way to go, and does absolutely NOTHING that you can't do
by making the Switchboard the startup Form, and putting *any code that
you like* in the Switchboard's Open event.

To open a persistant Recordset (rather than opening a table) - which
is apparently what you want for performance reasons - use code in the
Switchboard form's Open event like

Private Sub Form_Open(Cancel as Integer)
Dim db As DAO.Database ' or you can use ADO if you prefer, the syntax
' will be different though
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("LinkedTableName", dbOpenDynaset)
' Open another form (the Switchboard is a form too, don't know why you
' want two forms open, but ok...
DoCmd.OpenForm "TheOtherForm"
End Sub


John W. Vinson[MVP]
 
John Vinson said:
One big question:

Why do you insist on doing this *With a Startup macro*?

I don't insist. I have the switchboard being opened via the startup. I
need it maximized, however. That is not covered in the startup dialogue box
and as far as I know, that isn't a function available there (so I was told).

[snip]

Okay. I seem to have figured out what the "Switchboard's Open event" is so
I'm safe there.

[snip]

It would be nice that the sample db to dl have more than just a table or a
form open, but that it does both so that I can see what is involved.
Sometimes we even have the bonus of comments in the sample db's so we know
which coding is doing what. (That would be so _great_ to have.)

I'm working here with pretty much all abstract concepts. My computer
knowledge and experience bridge some of the gap re this but not all. I've
not been able to study very different A2K databases. If they even involve a
switchboard, they all pretty much seem to follow the same principles with
small differences to take into account the different names of forms, etc.,
in question. The sample databases that come with Access are the main db's
I've studied and "cracked open" as it were to look behind the scenes.
However, the switchboard code in the "Switchboard's Open even" are all the
same with very little difference, so it's been very, very hard to see what
we're dealing with in reality.

So, I'm advised _not_ to open the main table and am told to put in some code
to open another table. Unfortunately, I'm no vb expert but I've got a
deficient switchboard on my front end since my boss will not work on it
until for another couple of weeks (and I'm not even sure if she'll have time
to get around to it even then) I've got to keep plugging along till I'm at
the stage where I click to open and run full speed ahead. _Not_ the
situation yet. In the meantime, I've got a working switchboard that is much
more user friendly and that at least opens up at standard size and the
database windows minimizes after startup so it's there when I need it. But
I need the additional things outlined in my original message and a sample dl
that shows these things would be easier to work with at this point.
is apparently what you want for performance reasons - use code in the
Switchboard form's Open event like

Private Sub Form_Open(Cancel as Integer)
Dim db As DAO.Database ' or you can use ADO if you prefer, the syntax
' will be different though
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("LinkedTableName", dbOpenDynaset)
' Open another form (the Switchboard is a form too, don't know why you
' want two forms open, but ok...
DoCmd.OpenForm "TheOtherForm"
End Sub

Okay, thanks. I've learned a lot again today. I'll have to study this code
and figure out how it works. Yes, I know it's easy for all the non-newbies
here, but it's pretty complex stuff for me.

As mentioned, I'd still like to find a dl of a db that does what I outlined
in my original msg. Does anyone know of a link to anything that illustrates
more complex switchboard code? In other words, that opens up the
switchboard maximized, (while including the database window minimized) and
that does other things such as opens at least another form _and_ table?
This would be of enormous help to me and, I'm sure, to other newbies that
come to these ngs.

I'd greatly appreciate any help in this area. It would allow me to stop
"flying blind" and to steer through something I can actually see. That way
I'll have a better idea on what I'm dealing with.

Thanks and cheers! :oD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top