Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in coding(Urgent)
Message
De
29/12/1999 15:35:59
Jay Shepherd
Construction DataFax, Inc.
Montevallo, Alabama, États-Unis
 
 
À
29/12/1999 11:33:23
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00309892
Message ID:
00310069
Vues:
19
>1) I want to create a form programaticaly i.e. using
>CreateObject or any other method if possible also I want to
>add controls on it like Radio Button or Push Button or Text
>Box etc....
To instantiate a form, you can do something like this:
dim oForm as Form1
set oForm = New Form1

To add controls onto the form, use the Controls collection add method: (This assumes you have a form named form1 and a frame on it named Frame1)

Private Sub Form_Load()
Form1.Controls.Add "VB.CommandButton", "cmdButton", Frame1
Form1!cmbButton.Visible = True
Form1!cmbButton.Width = 1000
Form1!cmbButton.Caption = "My Button"
End Sub

>2) I want to pass a parameter to a Data Report for making a
>Query using Select Statement.

The VB Data Report is rather limited, and I'm not sure you can pass parameters to it. You might need to create a recordset ahead of time with your parameter and then set the datasource on the data report to your recordset.
Jay Shepherd
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform