470,620 Members | 1,547 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,620 developers. It's quick & easy.

Loading and unloading forms

VB6. When selecting from drop down menu options I display different forms by
using the Load (filename) and leave the form with Unload(Filename)

The Load event allows me to program the opening of a particular direct
access file and the Unload event lets me program the closing of the file.
Things are kept 'tidy' this way.

My problem is that I want to pass in a parameter when a particular form
loads. This will control which record is displayed. I want Pointer to
come in as a parameter.

Eg Seek #1, Pointer

Get #1, , MembRec

How do I do this?

Your help is appreciated

Geoff
Nov 5 '06 #1
1 2236
If your question is about the separate VB6 product, you will find a USENET
newsgroup devoted to that, comp.lang.basic.visual.misc and also, at the free
newsserver, news.microsoft.net, several Microsoft-sponsored newsgroups.
That would be the appropriate place to ask questions about the Visual Basic
environment. Despite a surface similarity, the user interface for Visual
Basic and the user interface for Access only have a different object model,
particularly the event model.

Typically, in an Access application, the Form would be bound, with its
RecordSource (a property you won't find in VB6 Forms) being a Query, SQL
Statement, or a Table. Only rarely will you find an Access application using
unbound Forms, as is common in VB6 (and earlier VB versions) because few VB
programmers found that the Data Control (VB6's way of 'binding') worked all
that well for them.

If I misunderstand, and you are actually talking about using VBA 6.0 in
Access, please clarify.

In Access, the DoCmd.OpenForm command, used to open a form programmatically,
allows you to specify an argument called "OpenArgs" and the Form itself has
a corresponding property called, unsurprisingly, OpenArgs that you can use
to retrieve the text information passed via the OpenArgs argument. (The VB6
product has no DoCmd.OpenForm object.method, and no corresponding property
to OpenArgs.)

Larry Linson
Microsoft Access MVP
"Geoff" <gf****@freenetname.co.ukwrote in message
news:Oa********************@brightview.com...
VB6. When selecting from drop down menu options I display different forms
by using the Load (filename) and leave the form with Unload(Filename)

The Load event allows me to program the opening of a particular direct
access file and the Unload event lets me program the closing of the file.
Things are kept 'tidy' this way.

My problem is that I want to pass in a parameter when a particular form
loads. This will control which record is displayed. I want Pointer to
come in as a parameter.

Eg Seek #1, Pointer

Get #1, , MembRec

How do I do this?

Your help is appreciated

Geoff


Nov 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Wayne Wengert | last post: by
5 posts views Thread by vineeth | last post: by
6 posts views Thread by Pete Davis | last post: by
2 posts views Thread by Rob | last post: by
3 posts views Thread by Eric A. Johnson | last post: by
2 posts views Thread by Geoff | last post: by
6 posts views Thread by ernesto.tejeda | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.