where's my form gone (1 Viewer)

ryetee

Registered User.
Local time
Today, 12:14
Joined
Jul 30, 2013
Messages
952
I have created a form using the form wizard. The data is from a query which pulls data from 3 tables. I designed the form in isolation and then copied it into my project.

I want to use this form in a collection. I've already done this with one form success fully. Let's say the form name is ListSaleItems

In VBA when I type the following

Dim frm As Form

Set Set frm = New f

I then get a list of objects and in particular a list of forms inthe format forms_xxxxx where xxxxx is the form name. My form ListSalesItems does NOT appear in the list.All the other forms I have do.

HELP!!
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 07:14
Joined
May 21, 2018
Messages
8,527
If you imported this one into the project then I would first do a "debug", "Compile" and save the project. You probably just imported without saving, thus not showing up in intellisense.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:14
Joined
May 7, 2009
Messages
19,234
i think you need to set the 'Has Module' property to Yes in order to see your form in the Microsoft Access Class Objects.
 

ryetee

Registered User.
Local time
Today, 12:14
Joined
Jul 30, 2013
Messages
952
If you imported this one into the project then I would first do a "debug", "Compile" and save the project. You probably just imported without saving, thus not showing up in intellisense.

Tried that. Incidentally when it first appeared to be missing I tried running the form on it's own and got error messages. I'd got various things wrong - missing table etc but I didn't think that would cause my problem. I'd also done a copy and paste to get them into my project, something I've done many times before with no problems. I deleted them, copied the table across and copied the form across using the external data source etc but still no joy.
 

ryetee

Registered User.
Local time
Today, 12:14
Joined
Jul 30, 2013
Messages
952
i think you need to set the 'Has Module' property to Yes in order to see your form in the Microsoft Access Class Objects.

OK well done sir!
That works. So, how did this get set to "No". I didn't even know of its existence so I would have set it to "no" knowingly.
Thanks again
 

isladogs

MVP / VIP
Local time
Today, 12:14
Joined
Jan 14, 2017
Messages
18,216
Has module is No by default.
As soon as you add any code it's changed automatically to Yes though you can also do that manually
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 07:14
Joined
May 21, 2018
Messages
8,527
Also if you select No for a form with code, it will prompt you that your code will be deleted from the form.
 

Users who are viewing this thread

Top Bottom