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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh Form

Status
Not open for further replies.

AndreAraujo

Programmer
Feb 14, 2002
62
PT
Hello,

I'm some problems with a form and Sub-Form.

I have a sub form that gives me the status of a line of process(one process can have several lines), Open , Cancel, reactivate, Terminated, and other informations about that process, in the min form i have a text box that do the reading of the process and line i want to control.
In the main form i have several buttons so i can change the status of the process, my problem is when i change the status os the process the data in the subform is updated and then i run a function that enables/disables the buttons.
The problem is that the buttons dont Enable/Disable , i used the me.requery command, the repaint, any ideas how to refresh the form . Currently i'm closing and reopening the data base but that is not a very good solution.

Thanks in advance,

André
 
Where is the focus when you are performing the me.requery and me.repaint commands? If you are in the Subform at the time of the code execution then you cannot use the Me. designation for the form. You must use FORMS![MainFormName].requery or FORMS![MainFormName].repaint.

Otherwise you would be perform these functions on the subform. give it a try.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Holle Scriverb,

I´m performing the requery and repaint in the main form when that form has the focus.
And when i use FORMS![FormName].requery i get the error that the form FormName could not be found , but if i use FORM_FormName.requery then i get no error.
It's vey strange.

André
 
When I posted the following:

FORMS![FormName].requery

I intended for you to substititue the name of your main form for the red code.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Sorry Scriverb,

I didnt make my self clear the comand i'm using is:
FORMS![FrmMainBarcode].requery and i get the error and if i use FORM_FrmMainBarcode.requery every thing is OK

Andre
 
Great. As long as you have found a solution.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top