Discussion:
form Help
(too old to reply)
Simon Fletcher
2003-10-09 19:30:45 UTC
Permalink
Simon Again,

Right what i want to do is this:
I have a Combo List and people can add new Band Names to it. I want it so
that when the user presses the button "GotoBand" it will goto the form with
the band name currently selected:

eg
if the band name was Linkin Park then I want it so that when you press
"GotoBand" it will goto the Form called: "frmLinkinPark"

Can ANYONE help??


Simon Fletcher
Bo
2003-10-20 04:27:02 UTC
Permalink
Let me suggest that you not use hardcoded form names, but rather, a form
that is dynamic and populates itself with different data, depending on what
it needed in each new situation.


This can be done in a variety of ways. but lets look first at a simple one.
a) set a global variable to hold the Key ( list index value ) or a string
( list box .text value )
b) load the form
c) within the form load procedure, examine the global variable ( case
statement would be nice here ) and then branch to the procedure that
performs the task of populating the form. The procedure uses dynamic
controls ( labels, text boxes, images, etc ) that is built dynamically at
run time, not design time.

Sorry, dont have an example, but if you do some research on dynamic
controls, it should all come clear fairly quickly.
Post by Simon Fletcher
Simon Again,
I have a Combo List and people can add new Band Names to it. I want it so
that when the user presses the button "GotoBand" it will goto the form with
eg
if the band name was Linkin Park then I want it so that when you press
"GotoBand" it will goto the Form called: "frmLinkinPark"
Can ANYONE help??
Simon Fletcher
paul lenehan
2003-11-10 18:06:09 UTC
Permalink
Form2.Show

or frmLinkinPark.Show
Post by Simon Fletcher
Simon Again,
I have a Combo List and people can add new Band Names to it. I want it so
that when the user presses the button "GotoBand" it will goto the form with
eg
if the band name was Linkin Park then I want it so that when you press
"GotoBand" it will goto the Form called: "frmLinkinPark"
Can ANYONE help??
Simon Fletcher
Ryan
2003-11-19 18:28:49 UTC
Permalink
Ok...maybe this has not been answered but here is what you do.
Create a GLOBAL variable that stores the name of the band (gBand) and
then use the following code to load the proper form.

gband = cboBandName.text
frmBands.show

Then what you have to do is make the frmBands form. This form would be
best used as a multi form. It can get its information from a database.
All you would then have to do is populate that form with the correct
band information.

You could also use a select case statement...
Post by paul lenehan
Form2.Show
or frmLinkinPark.Show
Post by Simon Fletcher
Simon Again,
I have a Combo List and people can add new Band Names to it. I want it so
that when the user presses the button "GotoBand" it will goto the form
with
Post by Simon Fletcher
eg
if the band name was Linkin Park then I want it so that when you press
"GotoBand" it will goto the Form called: "frmLinkinPark"
Can ANYONE help??
Simon Fletcher
Continue reading on narkive:
Loading...