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

how to refresh main project window

P: n/a
HI

How can I refresh the main project window in code in ms access 2000

For example, I create a new table, but when I minimize the form, the table
is not there until I do F5 (refresh).
I do the db.TableDefs.Refresh, but I guess this is not applied to the
project window for tables

thanks


Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi, Danny.

Use the RefreshDatabaseWindow( ) method of the Application object to show
new objects that you have created in VBA code. The TableDefs.Refresh( )
method will refresh the TableDefs collection after an append or deletion of
a TableDef object, but doesn't force a refresh of the database window
itself.

HTH.
Gunny

Coming soon:
For your Microsoft Access, database development and maintenance needs, see:
http://www.softomagixly.com

"Danny" <dannywork5@ZERO_SPAMhotmail.com> wrote in message
news:kD********************@news4.srv.hcvlny.cv.ne t...
HI

How can I refresh the main project window in code in ms access 2000

For example, I create a new table, but when I minimize the form, the table
is not there until I do F5 (refresh).
I do the db.TableDefs.Refresh, but I guess this is not applied to the
project window for tables

thanks

Nov 12 '05 #2

P: n/a
This is great. Thanks.

I have another question.
How can I make sure I remove all memory variables and such in code when I
close databases and forms.

Thanks

"'69 Camaro" <Ze*******@ZeroSpam.com> wrote in message
news:c2********@library1.airnews.net...
Hi, Danny.

Use the RefreshDatabaseWindow( ) method of the Application object to show
new objects that you have created in VBA code. The TableDefs.Refresh( )
method will refresh the TableDefs collection after an append or deletion of a TableDef object, but doesn't force a refresh of the database window
itself.

HTH.
Gunny

Coming soon:
For your Microsoft Access, database development and maintenance needs, see: http://www.softomagixly.com

"Danny" <dannywork5@ZERO_SPAMhotmail.com> wrote in message
news:kD********************@news4.srv.hcvlny.cv.ne t...
HI

How can I refresh the main project window in code in ms access 2000

For example, I create a new table, but when I minimize the form, the table is not there until I do F5 (refresh).
I do the db.TableDefs.Refresh, but I guess this is not applied to the
project window for tables

thanks


Nov 12 '05 #3

P: n/a
> How can I make sure I remove all memory variables and such in code when I
close databases and forms.
Unfortunately, no bell goes off to alert you that you've forgotten to
release memory for objects that are no longer in scope. You'll have to do a
visual check in your code to make sure that variables for all objects have
been closed and set to "Nothing" before going out of scope.

For example, if you have a DAO.Recordset object based upon a Database
object, then you would need to close the DAO.Recordset object and set the
variable to "Nothing" first before doing the same for the Database object.
If you were to set the Database object variable to "Nothing" before you
tried to close the DAO.Recordset object, then you would get an "Object
invalid or no longer set" error message and would be unable to release the
memory for the DAO.Recordset object.

It's a good idea to release the memory for these objects as soon as your
code is finished with them, but you also need to make sure that your
error-handing routines handle the release of memory for the objects that
your procedures use. To make this simpler to maintain, many VB programmers
delay releasing the memory for the objects until the very end of the
procedure, where the error handler will also redirect the logic to flow
through after an error is handled. That way, programmers only have to code
memory releases for each object once for each procedure, and they know
exactly where to look for that visual check when code changes are made
later.

HTH.
Gunny

Coming soon:
For your Microsoft Access, database development and maintenance needs, see:
http://www.softomagixly.com

"Danny" <dannywork5@ZERO_SPAMhotmail.com> wrote in message
news:g9********************@news4.srv.hcvlny.cv.ne t... This is great. Thanks.

I have another question.
How can I make sure I remove all memory variables and such in code when I
close databases and forms.

Thanks

"'69 Camaro" <Ze*******@ZeroSpam.com> wrote in message
news:c2********@library1.airnews.net...
Hi, Danny.

Use the RefreshDatabaseWindow( ) method of the Application object to show
new objects that you have created in VBA code. The TableDefs.Refresh( )
method will refresh the TableDefs collection after an append or deletion

of
a TableDef object, but doesn't force a refresh of the database window
itself.

HTH.
Gunny

Coming soon:
For your Microsoft Access, database development and maintenance needs,

see:
http://www.softomagixly.com

"Danny" <dannywork5@ZERO_SPAMhotmail.com> wrote in message
news:kD********************@news4.srv.hcvlny.cv.ne t...
HI

How can I refresh the main project window in code in ms access 2000

For example, I create a new table, but when I minimize the form, the

table is not there until I do F5 (refresh).
I do the db.TableDefs.Refresh, but I guess this is not applied to the
project window for tables

thanks

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.