98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · 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 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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Closing form after a certain time periodTo make a form close automatically after a certain time period, you need to assign the close function to a macro. |