473,569 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DoCmd.OpenTable help.

I am having problems with my OpenTable code. (Sorry, I'm new at this)

DoCmd.OpenTable Potential_Produ cts_Presented

The debugger says I need a table name.

This code is in the Dbl Click event of a form field. Thanks.

Aug 6 '07 #1
1 10594
On Mon, 06 Aug 2007 08:47:52 -0700, magmike wrote:
I am having problems with my OpenTable code. (Sorry, I'm new at this)

DoCmd.OpenTable Potential_Produ cts_Presented

The debugger says I need a table name.

This code is in the Dbl Click event of a form field. Thanks.
The name must be a string value, so enclose the name within quotes.

DoCmd.OpenTable "Potential_Prod ucts_Presented"

By the way, tables are for storing data, and should not normally be
viewed. It's best to use a form to view your data.

Because forms have events, you can manipulate your records, enter new
records or edit existing ones, and still have some means of assuring
the data is properly entered.

Create a form based upon your existing table.
Then:
DoCmd.OpenForm "Potential_Prod ucts_Presented" , acFormDS
will open your form in datasheet view.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3288
by: chanchito_cojones | last post by:
hi there, I am needing some help with a database I am putting together. The database works off of a main Form, which then has buttons on it that will open up other forms. The problem I am having is that if I am updating any information on the current record, and then open one of the other forms, the new form will not show the updated...
3
11050
by: user_5701 | last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of code: DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000, "tblTest", pathAndFilename, True The above line works perfectly fine, but when I change the table name argument (tblTest) to the name of a query, it fails and gives the following error:
4
3433
by: WJA | last post by:
I'm probably missing something here but I can't understand the following. When 2 users try to save a record with the same primary key (a number field), the first record saves as expected, but the second does not produce an error. The "Save" button uses "Docmd.Save" to save the record. If I insert "Me.Dirty = False" before "Docmd.Save" an...
2
6815
by: Mike | last post by:
I am trying to open a search results form based on the input from a prompt form. I am using the following code: --- Begin Code --- Private Sub btnSearch_Click() 'Dim Variable and assign data Dim srce As String, fstnme As String, lstnme As String, bidnum As String srce = Me.Source_Control If Not IsNull(Me.Text18) Then
10
4536
by: Shals | last post by:
Hi I'm using Command DoCmd.OpenView "dbo.vFDXQryBldgEdit3",acViewNormal,acEdit to open a view vFDXQryBldgEdit3 (written in SQL Server) in the Edit mode. This view is created on single table. but when I eecute this command view is opened in Read only mode. Am i missing something here or this command does not works in MS Access ..adp...
1
6264
by: Simon | last post by:
Dear reader, With the DoCmd.OutputTo ...... you have the possibility to write a report to an external location. In case the external location is an existing file the DoCmd is not responding with the warning "File already exist". The file will be overwrite without any warning even with the DoCmd.Setwarnings True in
0
3303
by: Cuaracao | last post by:
This is my code: Code1: 'DoCmd.OpenTable "tblImport" 'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False ' DoCmd.Close acTable, "tblImport" ======================================================== Code2:
10
49594
by: Dean | last post by:
My client has a db I am working that uses temp tables. During an update procedure, I had the code If fTableExists(tempTblName) = True Then DoCmd.DeleteObject acTable, tempTblName Then I thought of using: If fTableExists(tempTblName) = True Then CurrentDb.Execute "DROP TABLE " & tempTblName Is there an advantage to either? What really be...
4
6649
by: gazza10001 | last post by:
Hi i hope you can help my company uses access and has modified for its needs usually what happens is you serach for the invoice by its number and then it brings all the information up such as entry fields and so there is a button you press which then takes to through to a print preview of the invoice and you print out the invoice but recent ly...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.