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

Similar Articles

[PageSpeed] 45

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:

Office 2010 and Basic Authentication on IIS fails to open documents
Hi, I have just upgraded my Office 2007 to 2010 (yes the RTM build) and am running into some serious trouble accessing documents stored on a web server or SharePoint server configured to only allow Basic Authentication. Word opens as expected but does not do anything else (no prompt, no document download, nothing). Accessing any Office document on a server or SharePoint 2007/2010 server that has e.g. Integrated Windows authentication enabled, all is good I get prompted for credentials and the document downloads and opens as expected and as in Office 2007. Where is the settin...

VBA Form Combo Box question.
Help !!! I know this is most likely a simple question, but I'm stuck :( I not to populate a Combo box in an Excel spread sheet I just enter the location in the ListFillRange (EmpData!A1:A100). But I got creative and tryed making a Userform with VBA. Now I'm lost :( In VBA the combo box doesn't have a ListFillRange.... One place I read to enter the location in the ControlSource field, but it doesn't take the information. It keeps giving me an error message. Can anyone Help Please? Thanks Wally See response in worksheetfunctions. -- HTH RP (remove nothere from t...

How do I create a database from an Excel form?
Hello Everybody - I need to see if Excel can be used to create a mailing list database from an Excel form. If so...how do I go about doing this? The list will need to include the name of the company, contact person, and address. Thanks in advance for all of your help! It is greatly appreciated! Here are a couple of links: http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. FIRESIGN98 wrote: > > Hello Everybody - > > I need to see if Excel can be used...

OWA 2003 Log Off Button gives HTTP 500 Internal Server Error
When Logging off of 2003 OWA I get a page cannot be displayed error message. Everything else seems to be working fine. There's a KB about this. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Warren" <Warren@discussions.microsoft.com> wrote in message news:97769784-4AA2-4445-A0AA-86E0581681A1@microsoft.com... > When Logging off of 2003 OWA I get a page cannot be displayed error > message. > Everything else seems to be working fine. Ed, I did a search in the Knowledge Base and found nothing!!!! Help! Warren ...

Tax button on bank transaction screen
Are there plans to incorporate the Tax Entry button (which can be found on Transactions - Financial - General screen) on the Bank Transaction Entry Window? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/...

How can you set up a form that the cursor only moves to cells tha.
I have set up a form. Now I want my cusor to move through the worksheet only in certain cells. I want to be able to go from one cell that needs to be filled out to the next cell that needs to be filled out automatically. Example , move from cell a3 to c19 automatically. How can I do that? Hi! You can accomplish that by setting sheet protection. Select all the cells that you want to be able to navigate to then goto Format>Cells>Protection tab. Uncheck Locked. Now, goto Tools>Protection>Protect sheet. A list of options will appear. Uncheck Select locked cells and check...

Adding Contact information to a form
Hello - I am trying to get multiple contact entitys to display on a custom entity form. I have created a custom entity called 'Special Account information' It has a number of custom attributes that we do not wish to add directly to the account record. It is the child of the Account entity. I have made the Contact entity a referential child of 'Special Account Information' so it can have its own contacts, whether entered new or selected from the existing contacts in the system. I am working with the main application form. I am displaying all the custom attributes f...

Unable to open .xls file
Hello- I have Windows XP Home edition on my computer and I received an email with some info that is an .xls extensoin. I have Windows Worksheet and wanted to know how, if I could, look at this file? I also receive info with >pps (powerpoint) and am unable to open these files also. ANy suggestions? Thanx, -- Michie You may not have MSOffice. It's not part of Windows. It's a separate suite of applications. But MS does make a viewer for excel: http://office.microsoft.com/downloads/2000/xlviewer.aspx and one for powerpoint: http://www.microsoft.com/downloads/details.aspx?Fa...

Open Spreadsheet--Formatting Changed to Date??
I opened my spreadsheet and some, but not all of the columns on every sheet in the workbook has changed to a date format. I opened other spreadsheets and there was no change. Can anyone explain this. It's a real pain to deal with. ...

File Menu button is now an icon
I succeeded in changing File Menu to the Excel Icon and have no idea how I did it or how to get it back. The result is that a left click on that icon will bring up the Restore Menu and a right click will bring up a seriously abbreviated File menu. Two commands I use quite a bit are Set Print Area and Clear Print Area and neither are present on this abbreviated menu. Help! It sounds like you're still using xl2003 or below (not xl2007 with the new ribbon interface). If that's true... I'd try this first. Rightclick on an empty spot on any of the toolbars. Cho...

empty pivot table fields
How can I force a pivot table to, for example, say that there were no accidents in week 2. At present it says 3 in week 1 then jumps to 2 in week 3. I want week 2 =0 for charting purposes. -thanks Right-click on the Weeks field button. Select Field Settings Add a check mark to 'Show items with no data' Click OK bobf wrote: > How can I force a pivot table to, for example, say that there were no > accidents in week 2. At present it says 3 in week 1 then jumps to 2 in week > 3. I want week 2 =0 for charting purposes. -thanks -- Debra Dalgleish Excel FAQ, Tips & Book...

MFC CPropertySheet: hiding Apply button partially works
I am hiding the Apply button in a property sheet by using the following code before creating it: m_psh.dwFlags |= PSH_NOAPPLYNOW; // remove the "Apply Now" button This works in the sense that the button is gone, but what I'm finding is that the "A" hotkey is still assigned to it! If I add a checkbox to one of the tabs, for instance, and I underline the "A" in the label. If I hit Alt-A it will only set focus to the checkbox but not check it. This is the behavior that you get if you have another field with the same hot key, but there is none. My only tho...

CButton SetBitmap makes button lose xp style
Hello All, This is probably a really silly question, but I can't seem to find an 'easy' solution to this problem. I'm attempting to make bitmap buttons on the dialog, but these different dialog templates would be using the same class, and since i want to retain XP button style, i didn't want to use CBitmapButton with the owner-draw buttons. Using SetBitmap gets the bitmap shown on the button, but then the button goes back to classic Windows style, whereas other text buttons retain the XP look. Could someone please help? Thanks in advance, Isa "Isa" <...

Pivot Table Drill down
Is there a way for the drill down data to retain its Hyperlink. When I drill down on the Pivot Table I would like the original Hyperlink status from the source data to be retained. --- Message posted from http://www.ExcelForum.com/ Don't understand your problem here. Excel automatically retains the lin to external data so you can use menu 'Refresh' to update the table a any time - assuming the source is in the same place as before.. If you want to move a source file elsewhere, open the one with th pivot table first and use File/Copy, when the link will automaticall change (if ...

Convert Word Table -> Excel without merged cells?
Whenver I copy/paste tables from word to excel, I get merged cells in Excel whenever there are line breaks in the word table cells. How can I avoid this? TIA Steve Saved from a previous post: If your cells in your word table contain paragraph mark or linebreak characters, then excel will bring them over as separate cells. One way around it is to convert those paragraph marks & linebreaks to unique characters, then copy|paste and then convert them back to linefeeds. I like this technique (inside a copy of the word file): Select your table. Edit|replace|Special (show More if required)...

Unable to make a pivot table in sheet2
Hi, Can someone pls check below code. I'm able to export a query from access to excel in file "Myfile.xls" sheet1 but unable to make a sheet2 with pivot table of sheet1 data. Option Compare Database Public Sub TransferReport() Dim varFileName As String Dim xlApp As Object Dim xlWb As Object Dim xlWs As Object Dim MyRange As String varFileName = "D:\MyFile.xls" 'EXPORT DATA DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "MONTH END REPORT", varFileName, False, "Sheet1" Set xlWb = ActiveWorkbook xlWb.Sheets.Ad...

Command Button To Screen Grab
Good afternoon all. I was hoping somebody might be able to provide with some possible ideas on how to achieve the following...... I have an Access form to which I want to add a control button, which upon being clicked will do a typical ALT + PRNT SCRN type screen grab and then save this as a file, or at least paste this to an image object and then save the image object as the file. The problem is that there appears to be no way of doing a PRTN SCRN with the sendkeys function, so I'm now a bit stumped. Any insights would be most appreciated. Darren ...

Multiple buttons to control data source on a report.
Hi, I have a single report I would like to use. The table is structured with several columns. Is there a way to have multiple buttons on a form, and configure each button to open the report using a different data source (different column). So button 1 would be a report using column 1, and button 2 is for a report for column 2, and so on. Thanks. On Wed, 29 Aug 2007 14:06:46 -0700, ghmag <esung911@aol.com> wrote: >Hi, > >I have a single report I would like to use. The table is structured >with several columns. Is there a way to have multiple buttons on a >form, and co...

AfterUpdate Form Event Fires Repeatedly
I've been having this problem for a few months with a db I'm working on. I know there must be something simple I'm overlooking, so I'd greatly appreciate any help in identifying what the problem is. I'm using the following to create a timestamp: Me.dbLastUpdateUser = Forms!frmUserInfoHIDDEN!txtUserName Me.dbLastUpdate = Now() frmuserInfoHIDDEN refers to a form that is hidden on startup that stores the name the user logged in with. This feature works fine. The AfterUpdate timestamp used to work as well. However, now it repeatedly fires and forces the user to stay on ...

Keeping Context Menu open after Command
Hi, I've added a context menu to my CListCtrl that allows columns to be hidden. Is there a way to keep this menu open after the user clicks on a command? Basically like in the customize toolbar menu in Visual Studio. Olaf van der Spek wrote: > Hi, > > I've added a context menu to my CListCtrl that allows columns to be > hidden. Is there a way to keep this menu open after the user clicks on a > command? > > Basically like in the customize toolbar menu in Visual Studio. Bump. Somebody, anybody? I imagine you would have to start think "modeless dialog&...

Pivot Table dropdowns
Hi My pivot table dropdowns keep data whether it is still valid or not. I am expecting it to behave like a filter dropdown which refreshes each time you use it. Is there some way of refreshing the data ??? My list is now 3 times bigger than it need to be the only way I can get rid of the old entries is to delete the pivot and re-create it - which is time consuming... Any suggestions would be warmly welcomed... There's information here on clearing old items in a pivot table: http://www.contextures.com/xlPivot04.html Suzy From OZ wrote: > Hi > My pivot table dropdowns keep d...

Fixed asset tables missing
I have a client that is running MS Great Plains v8 with multiple companies. There is one company that has seemed to lost their fixed asset tables. There are no tables in that DB that start with FA. This company really does not use fixed assets but there is a problem with posting invoices they are receiving the following message: EXCEPTION_CLASS_DB DB_ERR_TABLE_NOT_FOUND and Unhandled database exception A get/change operation on table 'FA_Company_SETP cannot find the table. Invalid object name 'DPF.dbo.FA49900' I really am not sure what to do to fix this. Any help on this wo...

opening Word Perfect 11 documents in Word
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have recently switched from a PC to Mac. I have numerous Word Perfect version 11 (for Windows) documents that I used to be able to open in Word on my PC. I can no longer open them. This is a serious problem because it would take hours to convert all the hundreds of word perfect files to Word on my old PC and then transfer them to my MAC. Any suggestions? <br><br>Thank you. <br> LInda I'm afraid WP filters have not been supplied with Mac Office since a few versions after Corel (I ...

Can't open e-mail. It Freezes ...I have Office Enterprises 2007
A few days back I downloaded Office Enterprises 2007. Every thing went O.K.. Had e-mail for a couple of days. Now when I go into my e-mail (I can't) as it freezes up. Can't open e-mail messages , or send. My Internet Explorer works fine , so I do have excess to the internet. What is wrong ???? I do have dial-up , but this should not make my e-mail freeze up. May I add....I was able to open a message or two , but it took so long , and think I was luckey at the time for whatever reasons. !!!HELP!!! Did you already get the Outlook Performance Update? If not, I'd start with that...

Many similar issues: A save operation on table...
Client is using v7.5 and recently began having some errors pop up. Users were receiving: -- A save operation on table SOP_Line_Work failed accessing SQL Data -- A save operation on table POP_PO failed accessing SQL Data I made a backup of Dynamics and the company DB -- ran checklinks on all (there was a similar error message during SOP Work) -- ran SOP Doc Utils -- Deleted stranded sessions in SY00800, SY00801, and Dex_lock and Dex_sessions -- Deleted duplicate SOP records in Work and History -- Deleted SOP records not in batches -- Drop and created Auto Procs -- DBCC CheckDB and CheckCata...