>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