O
OoKiE
In Access 2002, I am trying to add objects which are user
defined datatypes to a form. I then want to set the object
in the form to equal an object of the same type from
within another module.
Maybe the 'pseudo code' below will explain my intentions
better.
Module - Constants
------------------
Public Type Question
Question As String
QuestionID As Integer
End Type
Module - Main
-------------
Sub DoStuff()
Dim AskQuestion as Question
AskQuestion.Question = "Can this work?"
AskQuestion.QuestionID = 1
form_AskStuff.Store = AskQuestion ' This bit is not working
DoCmd.OpenForm "form_AskStuff"
End Sub
Module - form_AskStuff
----------------------
Option Compare Database
Option Explicit
'This bit is not working, and is probably the
'wrong way doing this but hopefully shows my intentions.
Dim Store as Question
Private Sub Form_Open(Cancel As Integer)
Btn1.caption = Store.Question
..
defined datatypes to a form. I then want to set the object
in the form to equal an object of the same type from
within another module.
Maybe the 'pseudo code' below will explain my intentions
better.
Module - Constants
------------------
Public Type Question
Question As String
QuestionID As Integer
End Type
Module - Main
-------------
Sub DoStuff()
Dim AskQuestion as Question
AskQuestion.Question = "Can this work?"
AskQuestion.QuestionID = 1
form_AskStuff.Store = AskQuestion ' This bit is not working
DoCmd.OpenForm "form_AskStuff"
End Sub
Module - form_AskStuff
----------------------
Option Compare Database
Option Explicit
'This bit is not working, and is probably the
'wrong way doing this but hopefully shows my intentions.
Dim Store as Question
Private Sub Form_Open(Cancel As Integer)
Btn1.caption = Store.Question
..