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 7494 articles. 0 followers. Follow

6 Replies
29616 Views

Similar Articles

[PageSpeed] 40

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:

Publishing Layout and tables
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I am trying to copy and paste text from one cell of a table to another cell in the same table. The document is in Publishing Layout. The paste command deletes the text in the destination cell and then places a big empty text box on top of the table. I do dozens of these documents that are primarily tables and graphics. Previously I used Publisher on my old PC. Should I go back, or can this be done in Word for the mac? Hello, On 2010.01.29 8:44 AM, in article 59bb1ce2.-1@webcrossing.JaKIaxP2ac0, "Toni_T@officefor...

Formatting numbers in Table of Bar Chart
I cannot get my report to retain the currency format when previewed. It looks fine in design view, but does not retain it. I have changed all of the underlying queries and tables to include currency formatting. Any help would be appreciated Bev wrote: >I cannot get my report to retain the currency format when previewed. It >looks fine in design view, but does not retain it. I have changed all of the >underlying queries and tables to include currency formatting. With the report open in design view, setting the report text box's Format property to Curre...

Custom Forms/Macros to Automate Journal Entry
I know everyone is probably tired of my Journal questions. I realize no-one uses this (at least I don't see many questions about it here), but I think it is a great tool, and could be much better with a few tweaks. Until MS comes up with these tweaks, I will have to figure out how to come up with them on my own/with everyone's help here. Anyway.... I am looking for a way to create a macro that will open a journal entry, make it for a specific type of entry, start the timer automatically when the form is opened. For instance, I am placing a phonecall (bad example as the journal ent...

when i open an attachment it just shows a box i cannot open
Attachment, whether docs or pictures won't open. I can preview them inside the window pane, but then have to copy to word doc to print. Should be able to open attachment and then print just from there. Please help. It's like the Microsoft Picture manager is working strangely. ...

code to allow edits in form AND subform
Ok, here goes............. I have a form (frmBOL) which contains a subform (sfrmData). I have this code working to allow the form to be edited, but I can't seem to incorporate the subform into it. Everything I try gives me an error. Can anyone help? Private Sub cmdOK_Click() Dim sPassword As String sPassword = Nz(Me.txtPassword.Value, "") ' if it is a valid password, we let them edit the ' form that called this form. The calling form is ' responsible for check that the current user is ' either the QA tech on the record, or a me...

Opening a paramater form when open a report
I have a repor that takes date parameters from a seperate form.. As it is now I have to open the form put in the paramaters and then run the report which is based on a query... I would like to have the form pop up when I open the report and then close once once the report has run.. Help Please And thanks in advance bob On Wed, 15 Aug 2007 11:56:00 -0700, Bob wrote: > I have a repor that takes date parameters from a seperate form.. As it is now > I have to open the form put in the paramaters and then run the report which > is based on a query... > > I would like to ...

How do I get my MS Pub 2000 to open Pub files from Pub 2003?
i cannot get my Publisher 2000 to open files from Pub 2003....do i have to buy Pub 2003? or is there a solution that I can download? I have already disabled my antivirus and that didn't do anything.. also my files are not "read only". pls help. thx. Novice Novice <Novice@discussions.microsoft.com> was very recently heard to utter: > i cannot get my Publisher 2000 to open files from Pub 2003....do i > have to buy Pub 2003? or is there a solution that I can download? I > have already disabled my antivirus and that didn't do anything.. also > my files ...

Publisher 2000
After I open the Publisher 2000 program and attempt to open a file or create a new document, I get the message "Microsoft Publisher 2000 Version 6.0 has encoountered a problem and needs to close. WE are sorry for the inconvenience". I tried repairing the program and even reinstalling it, but that did not correct it. Suggestions? If you are trying to use Publisher on a network - don't it is not intended for a network Publisher files have to be worked on and saved to the local hard drive ONLY. -- Hi tom (tevanz@bellsouth.net), in the Microsoft� newsgroups you posted: ...

opening links in outlook
why i can not open links attached to my e-mails mike wrote: >why i can not open links attached to my e-mails > I think you did some mistake in typing so just do one thing first type the link in notepad and then direct copy and paste that in your mail. -- Stellar Information Systems Ltd. D18, Sector-33, Infocity Phase II, Gurgaon-122001 Phone : (0124) 326 6069, 432 6700 Website : http://www.stellarinfo.co.in/ What happens when you try? Do you get the error; "This operation has been cancelled due to restrictions in effect on this computer" See http://www.m...

Problem trying to open old money file
Hi, I am trying to open a four-month old money file, which was on my backup disk. It is a *.mny file, not a backup file. It was created using the same version of Money (2005) which I still use. When I start MS MONEY and try open my old data file, it tells my that it wants convert my file so it works with this version. (Not sure why as the file was created in this version of MS Money). Then when I try and carry out the conversion it gives the following error message. "Money cannot locate xxxx or cannot open it, possibly because it is a read-only file or you do not have...

Copying from a pivot table
I have a pivot table with data from cell B9 to cell S33. I want to add a few lines at the bottom (not as part of the pivot table), which subtract the figures in some of the rows to give a net total. I have just moved from XL2000 to XL2003, and this has caused a problem. Previously if say I wanted to subtract the figure in row 21, I could simply enter "-B21" in cell B38 and copy the formula across as far as column S. Now I can't do this because XL automatically uses the GETPIVOTDATA function, which does not adjust relatively as I copy it across. I can get what I want by fi...

Email with tiny attachments open slow
Good Day All, I am using Exchange server 200 and Outlook 2003 mail client. I have started to experience with a single machine where all of a sudden reading emails with attachments of any size, even 6k, slows greatly. Just selecting the email item in the list takes at least 30 seconds before the lower pane shows the body of the selected item. No other client has the same problem even while this machine does. The problem seems to disappear at some point and then returns. The machine was connected to a 10Mbps switch so I changed to a 100Mbps switch and Event logs reveal nothing. I have ...

Formulas Referencing Pivot Table results
I'm using a pivot table to sum batting statistics. I calculate the batting average by referencing cells in the table. However, when I add a new batter or remove a batter, and refresh the table, the formula references are incorrect. Why is that and is there a way to maintain formula references as new batters are added/removed? Thanks John It sounds like you could use a calculated field in your pivottable. show the pivottable toolbar if it's not already shown. click on PivotTable dropdown click on formulas click on calculated field Give it a nice name (Batting Average?). an...

Running Virus Scan Slowing down opening files
3 minutes to open files in excel and word Are you using kaspersky virusscan? It is know for it. If yes please ask you administrator to exclude scan on harddisk or network files in the settings. -- Arien ------------------------------------------------------------------------ Arien's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1892 View this thread: http://www.excelforum.com/showthread.php?threadid=390878 All Virus Scanning can be stopped: If your using Norton Follow the below if you want to open documents much faster Open Norton Click on: Norton Interne...

Can't save pivot table layout
I'm struggling to understand why Access 2003 can't save pivot table and pivot chart layout. I've tried to: - build a query\view and set pivot table default view: when opening again it shows in datasheet view and switching to pivot table view gives an empty work space; need to place fields in the wizard again. - build a form and set pivot table default view: when opening again it shows pivot table view uncomplete; not all the fileds are there since last save. it is an .adp Access 2003 + SP3 "Marcus" <marcus@idontwant.spam.org> wrote in message news:13q...

Can excel display text in CHART's data table?
All my text are displayed as "0".......just want to keep some comments nicely in there.Not sure whether excel can do this. Or anybody knows other better way? something like this: para1 1.2 1.3 1.4 para2 1 7 100 comments bad good excellent Hi, The chart data table is very limited in terms of formatting. You would be better using cells to display the information you want. And position the chart above them Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "8uv" <8uv@discussions.m...

Need an open house sign in sheet
Need an open house sign in sheet That's interesting, but do you have a question about Publisher? -- James Bart: "According to creationism, there were no cavemen." Homer: "Well good riddance, their drawings sucked and they all looked like hippies!" "soozeeque" <soozeeque@discussions.microsoft.com> wrote in message news:1096B15B-9766-4573-9FC2-2053BEC1F34B@microsoft.com... > Need an open house sign in sheet I would suggest keeping it simple. Use a table for the visitors' information and maybe your real estate company's logo...

Table to form
I have a field in a table called ID. 4 posititions. I have a field in a subform where I want to enter an ID. If the ID is not in the table, I want to know. How can I connect them? By the way, if it is not in the table, I would want a message to pop up or the ability to add to the table on the fly. Thanks. On Fri, 29 Jun 2007 10:36:25 -0500, "rob peterson" <buster@owc.net> wrote: >I have a field in a table called ID. 4 posititions. What do you mean by "positions"?? >I have a field in a subform where I want to enter an ID. If the ID is not in >the tabl...

Update Link Tables from Excel
I recently got an update from Office 97 to Office 2003. We're just slightly behind the times. Anyway, I had an access database in 97 that would link to an Excel file that I would use to add data to the Excel file based upon information in a master table in Access. Now when I try to run the query in Access 2003, it gives me an error that it is not an updateable query. I suppose I could export the master data to an Excel spreadsheet and use a VLookup function, copy and paste to all the records that need to be updated and the copy and paste values, but I originally did...

cannot open excel file from outlook
Excel 2007 cannot open document eithout first saving and opening thru excel Try to re-register Excel. Close Excel first and On the Windows Taskbar Start>Run "excel.exe /regserver"(no quotes)>OK. See the space between exe and /regserver You might have to designate a full path to excel.exe. In that case Start>Run "C:\yourpath\excel.exe" /regserver(quotes required)>OK Gord Dibben MS Excel MVP On Wed, 27 Jan 2010 11:38:12 -0800, Rick <Rick@discussions.microsoft.com> wrote: >Excel 2007 cannot open document eithout first savi...

opening links
Whenever I try to open a link in Outlook XP -- (Win XP Pro) it opens a "open with" prompt/box. Point it to the .exe for your preferred browser and click okay. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. After searching google.groups.com and finding no answer anonymous@discussions.microsoft.com <anonymous@discussions.microsoft.com> asked: | Whenever I try to open a link in Outlook XP -- (Win XP | Pro) it opens a "open with&quo...

unable to open your default mail folders...
I am running XP Pro and Office XP 2002. I currently use Outlook express on this PC but want to switch over to Outlook. When I try to open Outlook I get the message- Unable to open your default mail folders. Could not open item. Try again. Any ideas what's going on ??? Thanks in advance!!! -- Dennis Have you created a mail profile and installed your mail account(s)? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scrat...

Workbook always opens at a specific sheet and cell
I have a workbook consisting of many sheets. How do I make sure that everytime I open the work book, it would directly point to a specific sheet and cell? Hi put the following code in your workbook module (not in a standard module). sub workbook_open() me.worksheets("sheetx").activate end sub -- Regards Frank Kabel Frankfurt, Germany Zee wrote: > I have a workbook consisting of many sheets. How do I make sure that > everytime I open the work book, it would directly point to a specific > sheet and cell? methinks the original poster also wanted to activate a particu...

Exported form shows error
I exported a table and form to another database for use in another facility I operate. When I go to open the form, an error is displayed stating..."The record source '~sq_cSaidTable~sq_cList70' specified on this form or report does not exist" It then proceeds to alter the record souce in the form in design veiw. I have done that and the error persists. How do I repair this? -- Deltadog-Sacramento River Delta fisher extrodinairre... ...

EXCEL Files open Slow
Why is it that when I open associated files for Office 2007 (.xlsx and ..docx) that they open SLOW (approx 15 seconds). However, if I have Excel or Word open and then attempt to open specific files, they open in a snap ? I have Office 2007, Vista Home Prsmium, a 2.4 Quad Core system, and four gigs of ram. Can someone please explain this and help me out ? Thanks. Hi, If I get your point - when you open the files in the Window Explorer (outside of Excel) it takes longer. Sometimes that if because Excel needs to launch, and that can be slower than just opening a file from inside of Excel...