Prev: drag and drop with recount order
Next: displaying messages in the Status bar with the Status command
From: hubertholz via AccessMonster.com on 12 Mar 2010 16:25 Hello I would like to place a button that directly opens a particular table after clicking it. I am rather new to Access and cannot find the option in the Wizard.. Can someone help me? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
From: fredg on 12 Mar 2010 18:32 On Fri, 12 Mar 2010 21:25:50 GMT, hubertholz via AccessMonster.com wrote: > Hello > > I would like to place a button that directly opens a particular table after > clicking it. > I am rather new to Access and cannot find the option in the Wizard.. > > Can someone help me? So do you know how to write code? Add a command button to the form (without using the Wizard). Display the button's property sheet. Select the Event tab. On the Click event line enter [Event Procedure] Then click on the little button with the 3 dots that appears on that line. The code window will open with the cursor flashing between two already existing lines of code. Between those 2 lines write: DoCmd.OpenTable "TableName" Change "TableName" to whatever the actual table name is. Exit and save the changes. Note... the fact that you can open the table does not mean you should. Access Tables are for storing of data, not for viewing or manipulation. Allowing users to work directly in a Table is like playing with matches in a hay loft. You would be better off opening a form bound to the table in Datasheet View. Code the button's click event: DoCmd.OpenForm "FormName", acFormDS -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
From: Arvin Meyer [MVP] on 12 Mar 2010 18:36 The code would look like: Private Sub cmdWhatever_Click() DoCmd.OpenTable "MyTable" End Sub where cmdWhatever is the name of the button and MyTable is the name of the table. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access "hubertholz via AccessMonster.com" <u58479(a)uwe> wrote in message news:a4ea4cbd33e41(a)uwe... > Hello > > I would like to place a button that directly opens a particular table > after > clicking it. > I am rather new to Access and cannot find the option in the Wizard.. > > Can someone help me? > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1 >
From: Linq Adams via AccessMonster.com on 13 Mar 2010 12:17 I'm more concerned about the statement "cannot find the option in the Wizard" After placing the button on the form, and the Wizard pops up, do you not have the option, in the left hand column of ***Form Operations*** If so simply click on this then in the right hand column click on Open Form -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
From: hubertholz via AccessMonster.com on 14 Mar 2010 07:14 Hi guys, Thank you very much for your answers! You are right, It would be rather stupid to let the user make changes in the tables. However, I would like to provide him an overview of what is in the table. Until now, whenever I construct a new form and want to present the data there, I would have to, you know, flip one side after the other to get to my desired input. But, I would like to see them all on one list. I think instead of opening the table, Id prefer this solution..? hubert Linq Adams wrote: >I'm more concerned about the statement "cannot find the option in the Wizard" > >After placing the button on the form, and the Wizard pops up, do you not have >the option, in the left hand column of ***Form Operations*** > >If so simply click on this then in the right hand column click on > >Open Form > -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
|
Next
|
Last
Pages: 1 2 Prev: drag and drop with recount order Next: displaying messages in the Status bar with the Status command |