By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,036 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,036 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
I still think you're Don, yanking our chains.

Nov 28 '05 #2

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.