473,416 Members | 1,737 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Is it possible to refresh records displayed in an open table from a form?

MLH
If both a form and a table are open in an A97 database,
are there VBA commands that will refresh records shown
in the open table so that records appended since the table
was first opened will display - similar to how they would be
if one clicked on the table and pressed SHIFT-F9?
Nov 28 '05 #1
4 3080
I still think you're Don, yanking our chains.

Nov 28 '05 #2
Yes, you can use the menu commands in VBA, using
DoCmd

docmd.selectobject "mytable"
docmd.requery
(david)

"MLH" <CR**@NorthState.net> wrote in message
news:pk********************************@4ax.com...
If both a form and a table are open in an A97 database,
are there VBA commands that will refresh records shown
in the open table so that records appended since the table
was first opened will display - similar to how they would be
if one clicked on the table and pressed SHIFT-F9?

Nov 28 '05 #3
MLH
I tried the following...
DoCmd.SelectObject "tblSysTimes"
DoCmd.Requery
The first line err'd with "Runtime error 13 - Type Mismatch"
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx

Yes, you can use the menu commands in VBA, using
DoCmd

docmd.selectobject "mytable"
docmd.requery
(david)

"MLH" <CR**@NorthState.net> wrote in message
news:pk********************************@4ax.com.. .
If both a form and a table are open in an A97 database,
are there VBA commands that will refresh records shown
in the open table so that records appended since the table
was first opened will display - similar to how they would be
if one clicked on the table and pressed SHIFT-F9?


Nov 28 '05 #4
You could try:

Dim acIdiot As Long
acIdiot = acTable
DoCmd.SelectObject acIdiot, "MLH"

or I suppose you could just examine the intellisense prompt as you type
DoCmd.SelectObject; it will show that a numerical object type is the
first required parameter for SelecrObject. Sorry I forgot that utilites
based on "intelli" or "sense" have removed from your computer.

or I suppose you could have looked up SelectObject in the help file.
Here's what Access 2003 says about it:

"The SelectObject method carries out the SelectObject action in Visual
Basic.

expression.SelectObject(ObjectType, ObjectName, InDatabaseWindow)
expression Required. An expression that returns one of the objects
in the Applies To list.

ObjectType Required AcObjectType.

AcObjectType can be one of these AcObjectType constants.
acDataAccessPage
acDefault
acDiagram
acForm
acFunction
acMacro
acModule
acQuery
acReport
acServerView
acStoredProcedure
acTable
Note The constant acDefault, which appears in the Auto List Members
list for this argument, is invalid for this argument. You must choose
one of the constants listed above.
ObjectName Optional Variant. A string expression that's the valid
name of an object of the type selected by the objecttype argument.
This is a required argument, unless you specify True (-1) for the
indatabasewindow argument. If you specify True for the
indatabasewindow argument and leave the objectname argument
blank, Microsoft Access selects the tab in the Database window that
corresponds to the database object you specify in the objecttype
argument.

InDatabaseWindow Optional Variant. Use True to select the object in
the Database window. Use False (0) to select an object that's already
open. If you leave this argument blank, the default (False) is
assumed."

Oh, I forgot, you have no help file, do you?

Well, hope this helps unless you're in one of your:

"I don't know. I got tired of screwing with it." modes in which case
nothing will help.

Oh, I forgot, in your case nothing will help.

Nov 28 '05 #5

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

Similar topics

7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
1
by: Lauzon, Robert: IHAB | last post by:
I've got a form (frmViewRequests) that has the DefaultView set to Continuous (that's how I want it ... so far, so good) On this form, I've got a "Create New Request" Button that opens another...
0
by: P Mitchell | last post by:
Hello I would like someone to be able to help with the updating of data in a lookup list in a subform. In short, is their a VB instruction that is the equivalent of performing the action of...
8
by: Gerry Abbott | last post by:
Could someone please tell me is there a simple way to refresh a table open in standard table view, without having to either close and re-open, or open in design than back to datasheet view. Many...
0
by: thomasp | last post by:
This is a two part question, 1) The code below should display a form with a datagridview and a few command buttons. This form should allow the user to make change to the records displayed in...
3
by: Rashapoo | last post by:
I have just completed a basic course in Access. I have some relational b/g in DB2 and Cobol. I have a question my instructor couldn't answer (or maybe I didn't explain myself) I design a...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
5
by: vai | last post by:
i'm working in visual basic. i want to dispaly the records in a datagrid control who's data source is adodc.i want to display the records for a particular date. i.e. if the date which i accept...
2
by: malcster2 | last post by:
hello, i am a beginner to ajax. i have created a mysql database, which i would like to access from a web page. i have created 3 files, a html to display the data, a php file to extract the data,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.