Neebie Here

J

John Vinson

Just got this out of the box, so please excuse my ignorance for now.
How do you get a form to unload , I have tried what I knew in VBA as to
unload, but it say that this is not supported. What I am trying to do is
when a textbox gets to a certain value is to get rid of the form, I can make
it invisible, but I can not unload it. Is this not the thing to do in
Access.

Don't unload it - Close it.

DoCmd.Close acForm, "MyFormName"
 
D

DW

Just got this out of the box, so please excuse my ignorance for now.
How do you get a form to unload , I have tried what I knew in VBA as to
unload, but it say that this is not supported. What I am trying to do is
when a textbox gets to a certain value is to get rid of the form, I can make
it invisible, but I can not unload it. Is this not the thing to do in
Access.

this works
private sub pump_change
if pump.value = 5 then
form.visible = false
end if
end sub

this don't, and it does what I like
private sub pump_change
if pump.value = 5 then
unload form
end if
end sub
 

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

Top