Making a sub form an actual popup

jjake

Registered User.
Local time
Today, 16:44
Joined
Oct 8, 2015
Messages
291
I have a main form with a sub form that works just how i want it to by linking the PK to display only records associated with it. The problem is my main form is full on my screen and i do not want scroll bars. I also do not want to use tabs. I have a button that i would like to click that would open an actual pop up box that can be moved around the screen as needed and also has the nice box/border around it the the exit and title as such. Not like the hide/unhide function.

It would work the same way as the sub form, but i guess would be in a different form? How would i link these?
 
Worked great thanks
 
Ok so I thought I had this working but now I am having a problem.

So I have 2 tables

tblWorkOrderNew
tblHotWork


Main Form is frmWorkOrderNew. The primary key is WorkOrderID

I have numerous fields say a,b,c.

I have another form. subfrmHotWork. This is the form I am trying to have popup. Lets say it has fields 1,2,3.

This is what I am trying to achieve. User opens new work order form which is assigned a WorkOrderID. User fills in fields a,b,c. User clicks on cmd1 to open subfrmHotwork. User inputs data into fields 1,2,3.

User clicks cmd2 on subfrmHotWork to open a report of the selected WorkOrderID. (rptHotWork). the report shows WorkorderID with fields a,b,c and also show the Autonumber from subfrmHotWork and fields 1,2,3.


Whenever I try to open the subfrmHotWork it doesn't show me the WorkOrderID, it's blank?
 
Can you attach the db here?
 
Well, on a new record there is no record in the second table to open to. When that's the case, you can open the form in data entry mode and assign the ID. In VBA:

DoCmd.OpenForm...
Forms!subfrmHotWork.WorkOrderID = Me.WorkOrderID

If you stick with the macro, you'd use SetProperty after the OpenForm.
 
When I tried this is doesn't filter the records to the WO#. It allows me to assign he same Permit to another WO#
 
There are no records in the hot work table with work order ID's. If you're trying to create a new record:

DoCmd.OpenForm "subfrmhotwork", , , , acFormAdd
Forms!subfrmhotwork.WorkOrderID = Me.WorkOrderID
 

Users who are viewing this thread

Back
Top Bottom