Passing Controls on a form between modules

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need two forms, one for creating a record, one for updating it.
As all the validation etc will be identical, I thought it would be better to
put the code into one module. Then I could access the code from each form.
The forms have some check boxes on them, which are only visibly if there is a
Bank Hol that week. However I am having trouble accessing them from my
'General' module.
On form...
General.ChangeDays datevalue, frmUpd.Controls
In General...
Sub ChangeDays(day1 As Date, frm As Controls)
I want to say something like...
frm.lblLieu.Visible = True
but I get error 438
Object doesn't support this method or property,
So how do I do this
TIA
 
Hi
I've found I can use
On form...
General.ChangeDays datevalue, frmUpd
In General...
Sub ChangeDays(day1 As Date, frm As UserForm)

Don't know I missed that!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top