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 | Access forum

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

resolvedResolved · Low Priority · Version 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.


 

Access tip:

Closing form after a certain time period

To make a form close automatically after a certain time period, you need to assign the close function to a macro.

Save the macro and ope up the form in design view. open the Properties sheet.

In the TimerInterval property enter the length of time you want the form open for. This should be in milliseconds, so for instance if you want the form open for 5 seconds enter 5000, for an minute enter 60000.

You now need to attach your macro (to execute the Close action) to the OnTimer event property of the form.



View all Access hints and tips


Server loaded in 0.06 secs.