Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

microsoft+access+training+course - command move table objects

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » microsoft+access+training+course - Command to move to the Table objects window

microsoft+access+training+course - Command to move to the Table objects window

ResolvedVersion Standard

Iain has attended:
Access VBA course

Command to move to the Table objects window

Hi!

I've got a button on a form to close the form and I'd like to make it move to the Tables window when I click on it.

I tried...

DoCmd.GoToControl (Tables)

and

Dim db As Database
Set db = CurrentDb()

db.objects.Tables.SetFocus

...but neither worked.

Any ideas?

Thanks

RE: Command to move to the Table objects window

Hi Iain

I have looked at this and consulted with some collegues and the general opinion is you cannot use code to go to a specific view of the database.

This may be due to to the fact that in most Access databases the tables are hiden from the user.

Sorry if I couldn't help more

Carlos

RE: Command to move to the Table objects window

Carlos

I found the code that can do this in the Northwind db, so thought I'd post it in case its of use.

Private Sub cmdGoToTablesWindow_Click()

DoCmd.Close
DoCmd.SelectObject acTable, "Core", True

End Sub

...where "Core" is the name of one of your tables. I presume it will work for forms, reports etc.

Iain

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.