popup form?

mregina

Registered User.
Local time
Today, 17:28
Joined
May 5, 2006
Messages
10
I'm working on an invoice system for a company and they reqiure notification when an account is called up on a form that has an outstanding invoice.

So I created a query that locates all unpaid invoices, I made a form using that query, and I want to use it as a subform on my main invoice page.

But I'd like this subform to only popup when the criteria is met, that is the name on the subform matches the name on the current invoice called up.

Right now the subform is blank when the criteria is not met, and fields are filled out when they are...but I'd rather a nice big popup that can really get their attention...any idea if this is possible on Access 2000?

Thanks!
 
How bout setting the subform visible to False. Then if your criteria is met have the code change the visible to True.
 
Ceh

That sounds like it could work however I'm not that well versed in writing code to do it.
 
Well, I can give a shot at some aircode :)
First thing is to set your subform visible to NO. Dont click inside the subform, click the border,then right click, pick properties.(that was alwats tricky to me:))
Then for example if you have a textbox where your criteria is returned if it is there.... say [txtResults] ..... I would pick whatever executes your query...... say a command button..

CommandButton_Click()
If Not isnull(txtResults) then
me.SubformName.visible = true
else me.Subform.visible = False
endif
end sub

Try that.........
 
thanks, working on it...seems iffy...either the popup appears all the time or doesnt appear at all. Does the code you wrote need to be entered in the form or subform?
 
it should be in the code for the command button, or wherever the code is that has the critera you want to make it visible for.
 
ok I have it working when I press a button...but I'd like it to work when the page loads up..I tried changing the criteria to 'on load' 'on change' 'on focus' ect..and nothing happens sadly..
 
what code are you using for the criteria? If it is for a bound control, the on current event is probably the correct event to use.
 
This is what I have

Private Sub Main_Contacts_AfterUpdate()
If Not IsNull(BillAddress_Addr1) Then
Me.qrySalesRepByDate_long_UNPAID.Visible = True
Else: Me.qrySalesRepByDate_long_UNPAID.Visible = False
End If
 
Try it in the Current event of the form as a possiblity.

Also,

Me.qrySalesRepByDate_long_UNPAID.Visible = Not IsNull(BillAddress_Addr1)

can be used to replace your if statement, if you want to reduce your code down :)
 
gahhh NO idea why it is not working...either the subform appears for all invoices (and is blank for those where the criteria is not met) or it doesn't appear for ANY invoices (even those where the citeria is met)....

so I have decided to create a button called 'verify account' which can show my users ythe popup if needed...but now the form is acting odd and won't allow me to add a 'close form' button on it...gahhhh!!

Thanks for all your help guys...any other ideas and I'll try them out...going for a breather before my monitor ends up out the window :)
 
It should work fine if you put the same code on the forms OnCurrent event also.
If not post your DB
 

Users who are viewing this thread

Back
Top Bottom