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

Similar Articles

[PageSpeed] 15

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:

Hyperlink has changed on file re-opening
[Excel 2002, Win XP Pro] Hi All, i have cells in a sheet whose cell contents are hyperlinked to wor documents. the hyperlink is generated using VBA. part of the fil name includes the '[' and ']' characters (square brackets) when the macro is run, everything works fine (click in one of the cell and the appropriate word file opens) BUT when the workbook is closed an re-opened, the '[' & ']' is changed to '%5b' and '%5d' respectivel (which i guess is some srt of charatcer code for those symbols) if the hyperlink macro is re-run, it 're...

Opening Access without Menus displayed
Access 97 I have created a simple data lookup form for a customer to look up his own jobs in a shared database - there is only the one form in the mdb(e) that auto-opens on application startup. I have unchecked all the Startup functions etc. The program auto-opens the form okay but there is the default menu bar displayed across the top of the application window. The tool bars do not show. Is there a way to open the program and not show ANY menus as well? My form close event also quits the application. I intend to provide this as an mde. Any ideas gratefully appreciated Piri Piri wrote: &...

How do I open doc's from Publisher 2000 when I am using Pub 2003?
I recently purchased Publisher 2003 and can't seem to edit any document from a previous version. Are you running Norton AV? Try disabling NAV Script Blocking ~~~~~~~~~~~~~~~~~~~~ Start NAV Click Options. If a menu appears when you click Options, then click NortonAntiVirus. The Norton AntiVirus Options dialog box appears. Click Script Blocking. Uncheck Enable Script Blocking (recommended). Click OK. Restart the computer if prompted to do so. -- JoAnn Paules MVP Microsoft [Publisher] "GAR" <GAR@discussions.microsoft.com> wrote in message news:01222D01-7A00-4...

How to combine two identically structured tables to query them
Hi, I am sure there is a way that you can have a query that effectively takes two separate tables that have the identical column layout and add them together and then perofrm a query on the combined set of data. I just can't remember how to do it. My reason for need in this is that I have a table called "SellerNumbers" that has 4 million rows of data in it and what I want to do to improve performance is archive the oldest 2 years worth of data to an identical table called "SellerNumbersArchive", however the users want to be able to occasionaly run quer...

Advanced find
In advance find a customer wishes to know how many of each product an account has ordered. The Order lines, Quote Lines, Invoice Lines are not available as output entities. Therefore no reporting on advanced find is avaiable. ---------------- 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...

Button or key to conditionally change text foreground color?
I would like to find some quick method (some sort of visible button or hotkey) for the user of a worksheet to change the text foreground color for certain cells in a block of cells (A1:I9) to some specific color if and only if the cell is blank. I.e. when the user hits this "red" key/button, every empty cell in A1:I9 gets a new foreground text color--red. Nothing would be immediately apparent, as these are empty cells, but as soon as the user starts entering values into these cells, the data would be shown in red... a "make all new data red" button/key. Is this possible?...

Cannot open earlier version of access database
I'm trying to open Northwind database with MS Access 2003. The problem is that a dialog box appears prompting me to go to Database > Tools > Convert Database, however, the dialog box re-appears over a couple of times and disallows the user from doing anything within MS Access. If you are getting the Convert dialog you will need to convert the database to the version that you are working in and save it and then open it next time instead of the original file. During the convert process it will not change the original file. It will make a NEW copy for you to use. I wonder w...

Pivot table #11
I asked this yesterday but I am having difficulty getting to my original post. Page 1 of this news group keeps brining me to feb 17th.... anyways this is what i asked yesterday: Is there a way I can set up a pivot table with sub categories? i.e. Type of Contact is my heading and under it I have 4 categories (phone, walk-in, etc...) Thanks. A. I got this reply: If you add Type of Contact to the row area, you should see all of the categories. Can you describe the fields in your data table, and how you'd like them to appear in the pivot table? My answer to this is: I would like...

Calling javascript functions from isv.config button 11-21-06
Is it only possible to call a javascript function included in global.js using isv.config button?. The button is used in account entity form. // Mats ...

My OL 2000 will not open-get error message
I have MS Office Premium-all of the other programs work. When I try to open OL2000 I get the the error msg. MS Outlook has encountered a problem and needs to close. I removed MS Office Premium and re-installed it-same problem. I also clicked repair from Control Panel-same problem. -- Roma Does it work correctly when trying to start Outlook in Safe Mode? Start-> Run; outlook.exe /safe For additional troubleshooting steps see; http://www.howto-outlook.com/faq/outlookdoesntstart.htm -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www...

Auto Populate a form field
I have two tables with 1:1 relationship. Both have same key field (SS Number). There are two forms, one for each table. When I open Form A there is a button to open Form B. When Form B opens, I want SS Number field to equal the SS Number on the current record in Form A. How do I do this? Thank you in advance. Well, IMO the easiest way would be to make Form B a subform of A, and linking via the common key. Or you could make Form A a tabbed form, and A would be the first tab and B would be the second. Just a couple of random thoughts... "A Bit Frustrated&quo...

Connecting tables
Is there any way to connect tables in Publisher similiar to the way you can connect text frames for overfill. kpappano wrote: > Is there any way to connect tables in Publisher similiar to the way you can > connect text frames for overfill. Nope. -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org Is there any other way I can do it? Any suggestions? "Ed Bennett" wrote: > kpappano wrote: > > Is there any way to connect tables in Publisher similiar to the way you can > > connect text frames for overfill. > > Nope. > > -- > E...

convert or open .pub file
I have recieved a file with a .pub extention. I do not have publisher, any ideas on how to open it, and readers that I can download. No trial is offered for this program to download? I tried acrobat distiller (microsoft said it would work) but it dosent work thank corey corey wrote: > I have recieved a file with a .pub extention. I > do not have publisher, any ideas on how to > open it, and readers that I can download. ================================= Best bet would be open it in the Publisher version that created it. There are no Publisher viewers. Here's some info you ma...

Unable to open address book
Every time I try to open my address book in microsoft outlook, The computer says "the address book has been either deleted or you dont have permission to open the address book. I have the proper permissions. I dont know how to correct the problem. I tried to re-create the address book , but to no avail. Please help me. Sincerely Gary Monetta Post your Outlook version so we can answer you. -- Russ Valentine [MVP-Outlook] <anonymous@discussions.microsoft.com> wrote in message news:00b701c3c57c$adb12470$a101280a@phx.gbl... > Every time I try to open my address book in micr...

vanishing buttons / follow-on question
That was nicely resolved as noted, but: Example, one of my macros starts like this: =========================== Sub MainLogFindLastEntry() ' ' MainLogFindLastEntry Macro ' Macro recorded 29 05 2006 by Consultant ' ' Keyboard Shortcut: Ctrl+Shift+L ' Sheets("Log").Select =========================== now that this macro is called by a button, I have discovered the following: 1. if no worksheets are open the macro button will find a and open the correct workbook and sheet [brilliant!] 2. if other sheet(s), workbook(s) are open but not the correct workbook, t...

Create Form Dynamically in VBA
Without going into alot of details I need to create thru code and dynamically a FORM in Datasheet View with a recordsource is an exisiting query. Can this be done in code on the fly. I also need code that deletes or purges the same form object. thanks for any help. Why? It is not a good idea. Perhaps if you described what you want to do, we can help with a how. -- Dave Hargis, Microsoft Access MVP "Bret" wrote: > Without going into alot of details I need to create thru code and dynamically > a FORM in Datasheet View with a recordsource is an exisiting query. Can th...

What table....
What table does the "More addresses" section use? The "More addresses" is found on the side when you are filling out a contact. CustomerAddress Base Dave "GDaxon" <GDaxon@discussions.microsoft.com> wrote in message news:BA8C768F-3664-4FAF-9CBA-6F6F28C8FD64@microsoft.com... > What table does the "More addresses" section use? The "More addresses" is > found on the side when you are filling out a contact. Dear, Check Customeraddressbase. I hope this will help u. Thanks, MVP- CRM/.Net mscrmexpert@gmail.com "GDaxon&qu...

Look up table?
I am sure this is simple, but I dont know how to achieve it I have 2 drop down lists the produce values 1-3 each and a table A B C 1 500 550 600 2 450 500 550 3 400 450 500 How do I get the value at the intersection of the row/coloum, so if the drop downs come up with 1 & b the answer should be $550 Thanks >I have 2 drop down lists the produce values 1-3 each >if the drop downs come up with 1 & b If both drop downs have selections of 1,2 3 then how can the drop down...

OnCurrent of Form - Make not visible on condition
I currently have the following code under the onCurrent of my form: Private Sub Form_Current() Dim strSQL As String Dim db As DAO.Database If Me.ID < 0 Then Set db = DBEngine(0)(0) strSQL = "INSERT INTO LastVisitedRecord ( lvCompanyID ) " _ & " VALUES ( " & Me.ID & " ) " db.Execute strSQL Set db = Nothing End If End Sub However, I'd like to add something to it, but have not had success. I'd like the form to evaluate if the NOTES field is empty (which is there but not visible) and if so, make other c...

Split Database, Can't Append to Table
I have a table to which I daily upload financial reports into one table, and run an append query to add those records not already listed in the master table. I recently split the database because of some other random conflicts we began to have once two users began to access the database. I read that splitting might help. Now I am unable to append to the master table using the append query. I get a message that there is a violoation regarding an index, primary key, or relationship. I've also tried to manually cut & paste the records from the results of the append query with n...

Organizational Forms access in Exchange 2003 OWA
There is an HTML convert tool available for Org Forms in Exchange 5.5, but I am unable to find a way to view our Org Forms in our new Exchange 2003 OWA. Does anyone know of a way to view organizational forms in Exchange 2003 OWA? ...

reply button
Hi, My problem is when I click on the reply button, it puts the wrong address in the To: field and re-add's this address to my contact list. I have no idea where its getting this address from but its becoming very annoying. If anyone can tell me how to set it so it will reply to the address in the original post I would appreciate it much! Im using Outlook 2002 (10.2627.2625) that came with Office XP. Thanks, Bob ...

Data table vs Axis value abbreviations
Windows 2000 Office 2000 I have a chart with the data table showing. The values go into the millions. On the axis, I'd like to use e.g. $1M instead of $1,000,000. Is there a way that I can maintain the actual value in the data table, while abbreviating the axis value? Thanks in advance for your help Rita Palazzi Senior Engineer/ FedEx Express Never mind. Someone showed me the "Display Units" on the axis format menu and I was able to do what I needed. Hope everyone has a GREAT Thanksgiving! Rita Palazzi wrote: > Windows 2000 > Office 2000 > > > I hav...

Lead sign up form into Microsoft CRM with ASP?
Hi, I'm just testing out Microsoft CRM and wondered if it was possible to use standard ASP (some of our older sites are not yet .Net), i noticed some examples for .net but have had no such luck with standard asp. Is it even possible to insert leads directly into Microsoft CRM 3.0 from a standard ASP page? Best regards, Tom yes, you can use standard asp to call webservices, if not use javascript to call crm webservice and do that. It is possible. Let me know if you need assistance for that. -- Regards, MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat wi...

Data Access Page + Text Box + Command Button + Pivot Table
Hello, I'm trying to create a DAP tool that is a simple concept. 1. A user enters a value in the text box 2. User clicks command button 3. Command Button takes TextBox.Value and applies the value as a filter for column 1 in the pivot table. Can someone please help me with code? I have no experience with VBScript, but not too shabby with DAO, ADO, VB & VBA. Thanks players! -- Message posted via http://www.accessmonster.com ...