I am trying to create a "dynamic" input form into access. Basically I have a list of vehicles held within a DB that mileage needs to be entered each month. Well what I want to do is be able to create the input boxes on the fly.
I am not new to coding, just have not worked with VB6 since like 2001 and trying to do some refreshing. I checked the DAO and it is installed correctly. I am working in Access 2003 on a Windows XP SP2 32bit system.
Here is the code I have:
Anyhow the goal is ultimately be able to create the textboxes on the fly and display them on the form. If anyone can help me on how to instantiate the object or what I am doing wrong I would appreciate it. Thanks!
I am not new to coding, just have not worked with VB6 since like 2001 and trying to do some refreshing. I checked the DAO and it is installed correctly. I am working in Access 2003 on a Windows XP SP2 32bit system.
Here is the code I have:
Code:
Private Sub Form_Load()
Dim txtTest As New TextBox
' Error thrown here "ActiveX Component can't create object."
txtTest.Name = "txtTest"
txtTest.Value = "Testing"
End Sub
Anyhow the goal is ultimately be able to create the textboxes on the fly and display them on the form. If anyone can help me on how to instantiate the object or what I am doing wrong I would appreciate it. Thanks!