Open Table with Button on form

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

0
hubertholz
3/12/2010 9:25:50 PM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
36597 Views

Similar Articles

[PageSpeed] 51

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
10
fredg
3/12/2010 11:32:12 PM
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@uwe> wrote in message 
news:a4ea4cbd33e41@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
> 


0
Arvin
3/12/2010 11:36:25 PM
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

0
Linq
3/13/2010 5:17:12 PM
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

0
hubertholz
3/14/2010 11:14:31 AM
"hubertholz via AccessMonster.com" <u58479@uwe> wrote in
news:a4fe1b66a018e@uwe: 

> 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

You can make a form appear just like a table datasheet with one click 
of the mouse. While in form properties, set the default view to 
datasheet. This form should not allow editing the fields.



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



-- 
Bob Quintal

PA is y I've altered my email address.
0
Bob
3/14/2010 12:38:06 PM
Using a datasheet has advantages even if you allow editing. You can protect 
(lock, disable) some fields. You can not allow deletions. You can create an 
audit that keeps track of edits. You cannot do any of that from a table.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"hubertholz via AccessMonster.com" <u58479@uwe> wrote in message 
news:a4fe1b66a018e@uwe...
> 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
> 


0
Arvin
3/15/2010 10:09:30 PM
Reply:

Similar Artilces:

Message in SOE entry form
I have an order that when I try and edit in Sales Transaction Entry it's giving me the message "This Document has been posted" and will not let me do anything with the order. Any Ideas? Go to CustomerSource and run the Automated Solution to fix this error. Scroll down to Sales Order Processing and run the link corresponding to SOP Already Been Posted Error. https://mbs.microsoft.com/customersource/support/selfsupport/automatedsolutions/automatedsolutionsR10.htm Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusin...

Views using linked tables
Hi! On my own sqlDB, I need to link tables form other sqlDB in the same machine and then, create views that combine fields of my own tables and linked tables. Please give some suggestions. Thanks LAM LAM (luism0@(arroba)yahoo.es) writes: > On my own sqlDB, I need to link tables form other sqlDB in the same > machine and then, create views that combine fields of my own tables and > linked tables. Please give some suggestions. CREATE VIEW myview AS SELECT ... FROM localtable JOIN otherdb.dbo.othertable ON That is, you refer to the tables in...

File Won't Open
Hi, I accidentally opened an xls file in Word, saved it with the Save command and now can't open it in Excel. Help please! -- Roadrunner ------------------------------------------------------------------------ Roadrunner's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27140 View this thread: http://www.excelforum.com/showthread.php?threadid=466566 It's gone, you might be able to open it in word and get some text info out of it but essentially it's gone :( -- Regards, Peo Sjoblom (No private emails please) "Roadrunner" <Roadr...

Pivot table 11-20-09
Hi, Can I use the same value from data range in the pivot table part from using the count and average etc? If yes how? Please Help thnks Vinit Vinit, Yes. Just drag the button of interest onto the data area again, as many times as needed, and set that instance to the desired value (count, average, max, min) HTH, Bernie MS Excel MVP "Vinit" <Vinit@discussions.microsoft.com> wrote in message news:BEB75F96-5E79-468A-97A9-E8841111279E@microsoft.com... > Hi, > > Can I use the same value from data range in the pivot table part from usin...

A little help with access forms.
I am in the process of converting an Access 2002 db to use SQL Server 2000 as the backend. I have found a bug that is giving me fits. I know it is because of my own ignorance as to how Access forms work. I have a form that pulls from a local query that joins two tables. I have a second form that opens when a button is pushed on the first form. The second form updates one of the tables called from the first form. After the update and I close the second form, the first form is unchanged. Even if I refresh the record or scroll to another one, the record appears to be unchanged. If I close the md...

forms and contacts
Have designed a task page to suit my needs. I would like to be able to add contact's details into that form so I don't have to retype the phone numbers etc on each new task. Have tried adding the contact field from the drop down field chooser while designing the form but can't get it to work. Any ideas? ...

MSCRMDeletionService Error: Deletion Service failed to clean up table=CleanupInactiveWorkflowAssembliesProcedure
Every morning we have following 3 Error-Messages in the Eventlog (Application-Log) of the CRM Server. On this installation we tested the import of address-Data several times. Accounts and Contacts with deletionstateCode = 2 are not physically removed from the database. Can anybody give me a hint, how to solve this problem? Can the timeout be increased? 1st Error Message: ------------------ Event Type: Error Event Source: MSCRMDeletionService Event Category: None Event ID: 16387 Date: 25.10.2009 Time: 07:38:11 User: N/A Computer: S0059 Description: Error: Deletion Service failed to clean ...

How do I open an Excel worksheet in a new window?
How do I open an Excel worksheet in a new window? Start your opening process all over. Don't go through the excel you alread have open. go back to your desktop and open a new excel and then open your workbook through there. "Ymotana" wrote: > How do I open an Excel worksheet in a new window? Do you have a need for something other than >File >New >Blank workbook ? Perhaps Tools>Options>View "Windows in Taskbar" is what you/re looking for. Gord Dibben Excel MVP On Wed, 30 Mar 2005 15:05:05 -0800, "Ymotana" <Ymotana@discussions.mic...

Opening shared notebook on SharePoint opens temp directory in brow
If I go to a SharePoint site and click on the link for a shared OneNote notebook we find that the temp directory gets displayed in OneNote (100s files!). This seems to only happen on our Windows 7 PCs (all are x64) and if we use Firefox or Chrome - IE works fine. Does anyone have a similar environment without the problem or know of a solution? Thanks ...

Q: pivot table
Hello, Is there any way I can add one more column that calculate average of first and second column in the pivot table? (Average column is not available in the source sheet, and I can not change it) Thanks, ...

How to put a table in Slide Layout so it can be applied to a page?
I am working with Slide Masters and Layouts for the first time. I'm doing OK with making them and applying them to pages. But when I make a table it doesn't work. When I go to Insert>Layout Placeholder> Table, then I get a box that has the word "Table" in it. Is that right? When I look for controls to make it look like a table with headers, cells etc., right-click on it, whatever, I don't see any table controls, just the usual text/box attributes (size etc.). So in the ribbon I go to Table Styles and click on one of them (Light #5) and then I have a no...

Animated buttons
Is there a way to make a nimated button on excel activate a macro -- Message posted from http://www.ExcelForum.com ...

Archiving single sheets form workbook
Can I have only one sheet auto archive? -------------------------------------------------------------------------------- I have a workbook that has multiple pages. Periodically this workbook main page updates. Subsequently, all the other sheets update. The use will select certain sheets to print, archive and send to clients. I there a way to auto archive these sheets only when they are accesse via a hyperlink? Below is a sample I have used for workbooks created that only have on sheet. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$q$2" Then ActiveW...

Button to update a field
Can someone point me in the direction of a tutorial to do the following I have a continuous form that allows me to choose the supplier for a product product name | supplier 1 | supplier 2 | supplier 3 | supplier 4 | supplier 5 | text box button button button button button There can only be one supplier, all updates will be done to the item information table. Currently I can do this with a combo box, but would prefer to do with with a buttons. Thanks The standard way to select one item among many is a combo box not buttons...

Outlook 2003 attachement not opened
Hi, I've just installed Outlook 2003 and I have this problem: a friend sent = me an e-mail containing an attached e-mail message (signed, if it = matters), and Outlook wouldn't open it saying "An error occured in the = underlying security system". How can I open that file? Note that that file has a ZIP file attached, = so this could be the problem. Thanks in advance, Radu ...

Help using Tables
Hi guys! I need some help. I have a table that has a percentage range. Like this. Less than 90% 0 90.0% 90.9% $ 2,625 91.0% 91.9% $ 3,413 92.0% 92.9% $ 4,200 93.0% 93.9% $ 4,988 94.0% 94.9% $ 5,775 95.0% 95.9% $ 6,563 96.0% 96.9% $ 7,350 97.0% 97.9% $ 8,138 98.0% 98.9% $ 8,925 99.0% 99.9% $ 9,713 100.0% 100.9% $ 10,500 101...

How To Add Rows and Cells in The Table Using IHTMLTable
Hello Everyone, I am currently working on the DHTML Dialog Based Application. I have been stucked due to a problem, which is that my HTML Page contains a HTML Table element and a button, i want my application to add rows and cells on the click event of that button. I have captured the event of the button but i am unable to add rows and cells in the table. Can anyone tell me how to acheive that by using the IHTMLTable interface. Thanks in advance. From, Ghazanfar Ali. "Ghazanfar Ali" <ghazanfarali17@hotmail.com> wrote in message news:uMq8CiCjFHA.1416@TK2MSFTNGP09.phx.gb...

league table #4
Sorry peeps email is smurfsix@hotmail.com ...

Help needed with form problem
Workbook contains several forms of varying style and function. One form shows the results of 10 recent tests in a countdown fashion, showing just the results of one test, followed by a one-second delay, followed by just the results of the second test, and so on until the result of each of the 10 tests has been shown. Then the program proceeds on to the next step by calling up a different form. The problem . . . Sometimes when the program starts running one or two of the forms are blanked out ("white" with just the top header showing). The forms continue to function within the ...

Automatic opening
Please could someone advise how to stop the mail opening for a moment,before I delete. This seems to imply especialy on spam that I have read the message. Thanks The fact that Outlook shows the msg as being read has no connection with the sender, unless you send a read receipt "DEACON SCREWS" <rldeacon@btconnect.com> wrote in message news:rr6dnWdqmrKtvu3XnZ2dnUVZ8gmdnZ2d@bt.com... > Please could someone advise how to stop the mail opening for a > moment,before I delete. > This seems to imply especialy on spam that ...

Voting Buttons -- Missing drop-down box in Tracking tab
I have a user on Office 2003 who uses voting buttons in Outlook. She claims that on the Tracking tab of her sent message, a drop-down box should appear at the right side of each user's "response" column showing the voting options -- for her to manually populate if the respondent verbally replies to her. Our outlook 2003 does not have this. I can find nothing on it. What is she talking about, and how can I set up this feature for her? -- Lisa M I think she's wrong. That function exists in a Meeting's Tracking table, not a vote related tracking table from an em...

Hide toolbars when file opens
Hi all, I have created a file for people to use to get quotes. When the file opens, I do not want them to have access to any toolbars. How can I hide these when the file is opened, but only for this file - not any others that the user may subsequently open. All that they may need to do, is print the page out after getting a quote. Many thanks. Rob You can use this in the Thisworkbook module Rob Private Sub Workbook_Activate() Dim bar As CommandBar For Each bar In Application.CommandBars bar.Enabled = False Next End Sub Private Sub Workbook_Deactivate() Dim bar As C...

Permanently open Group Schedule
Is there any way I can configure things such that a Group Schedule is permanently open, i.e. when I exit and restart Outlook? Not that I know of in any version of Outlook that supports group = schedules. --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. =20 After furious head scratching, Chris Mitchell asked: | Is there any way I can configure things such that a Group Schedule is | permanently open, i.e. when I exit and restart Outlook? ...

Substitute button is greyed out on line item in assembly transacti
I know how this is supposed to work and have used it before however when I am on a line item even though on the inventory card shows this item has two substitute, the substitute button is greyed out. Any ideas? Thanks Leslie forgot to put the notify on "LASM" wrote: > I know how this is supposed to work and have used it before however when I am > on a line item even though on the inventory card shows this item has two > substitute, the substitute button is greyed out. > > Any ideas? > > Thanks > Leslie You are correct in that there must be at leas...

excel opens up looking like it is in ms dos
how can I get my excell to stop opening up looking like it is in MS-DOS mode. I get an error message that wants to send the info to microsoft, when it hit yes send or no don't send it then shuts down. Hi what exact error message do you get and does this happen all the time for all files? -- Regards Frank Kabel Frankfurt, Germany osborne4 wrote: > how can I get my excell to stop opening up looking like it is in > MS-DOS mode. I get an error message that wants to send the info to > microsoft, when it hit yes send or no don't send it then shuts down. Sounds like you...