Passing a value from one form to another
From: Macsicarr (news_at_DoNotEmailMe.co.uk)
Date: 11/21/04
- Next message: George Bassili: "separtor lines and multi-screen"
- Previous message: Cash: "SERVICE"
- Next in thread: Björn Holmgren: "Re: Passing a value from one form to another"
- Reply: Björn Holmgren: "Re: Passing a value from one form to another"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Nov 2004 21:57:20 -0000
Hi All
As per usual I'm starting a major hobby project (for me anyway) before I can
VB walk!
Although what I have done works, I'm sure it is not the correct way so I
thought I would ask the gurus.
In concise terms, I have 2 forms. The first form has a control array of say
10 labels and a control array of say 10 buttons. The captions on the labels
and the tags on the buttons are populated from an Access DB using ADO/SQL.
This part of it works fine, please do not see this as a DB query.
When the user clicks on the relevant button, I need to bring up my second
form, hide my 1st form and populate the control array of labels on this 2nd
form with other data from this Access DB. This Access DB data is derived
from the ID that is stored in the relevant button's tag. Basically each ID
queries the data for the row that has this ID. This part works fine and
again is not my query.
My query is that at present, I hide the first form, show the 2nd form, get
the value from the button's tag, query the DB and populate the 2nd form all
from the onClick event in the 1st form. Although it works, I just feel that
I should be sending the ID from the 1st form to the 2nd form, the 2nd form
does all of the populating and when the user clicks the back button on my
2nd form, this 2nd form is simply hidden and the 1st form is shown.
I do a lot of ASP web programming and this latter submit then
request/display logic ... well seems more logical than what I am currently
using.
Can you advise me on my pitfalls and solutions.
Thanks
Macsicarr
- Next message: George Bassili: "separtor lines and multi-screen"
- Previous message: Cash: "SERVICE"
- Next in thread: Björn Holmgren: "Re: Passing a value from one form to another"
- Reply: Björn Holmgren: "Re: Passing a value from one form to another"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|