Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms not behaving the way I would like

Status
Not open for further replies.

Eradic8or

Programmer
Oct 29, 2000
159
GB
I have a really annoying problem here.
I have a form which is bound to a query. All works fine when navigating through the records but I also have a button on the form which opens another form and does a lookup.
The problem I have is when the second form is closed down, the original form goes back to a blank record whereas I want it to stay at the records it was at before I opened the lookup form.

Does that make sense?
 
Hi

"whereas I want it to stay at the records it was at before I opened the lookup form"

I would expected that to be the case, you need explain more about what you are doing:

are you closing and re-openning the first form?, if yes, why not just hide (ie visible = false), then show it again (visible = true)

are you openning the second form as modal (perhaps using acDialog)

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I am not closing the first form, I am just opening the second form. I have tried modal but that didn't work.
I have also tried acDialog but that open the form in table view, not form view.

 
Hi

"but that didn't work"

Explain, error messages?, what happened?

"I have also tried acDialog but that open the form in table view, not form view."

Using acDialog in DoCmd.OpenForm in the appropraite paramter position caused form to open in data sheet view?, I think not, try reading help on docmd.openform

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Yes, you are right, I was specifying acDialog as the first propert and not as the WindowMode. My mistake. That seems to have cured one of my problems.

Perhaps you can help with another?.

How do I (in real time) refresh the contents of a combo box which is linked to a table, if I change the contents of the table without closing and re-opening the form?.
 
Actually, going back to my last post, it worked once.
Now what I get is when I try to close the form, my CPU usage jumps to 100% and Access crashes.

There is no code whatsoever on the close button.
 
Hi

"How do I (in real time) refresh the contents of a combo box which is linked to a table, if I change the contents of the table without closing and re-opening the form?."

How about executing MyCombo.requery, after you update the table?, or in teh ongotfocus event of the combo box put MyCombo.requery


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top