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

Passing Values

Status
Not open for further replies.

adjoe

Programmer
Joined
May 24, 2002
Messages
4
Location
US
I want to pass a value to a field called txtpatient_v_irbnumber, depending on the value of a field called txtpatient_v_protocol, this is what I did.

In the refresh method of field txtpatient_v_protocol
I entered

ThisForm.txtPatient_v_irbnumber.Refresh()
RETURN DODEFAULT()

and in the refresh method of field txtpatient_v_irbnumber
I entered

ThisForm.txtpatient_v_irbnumber.Value = protocol.irbnumber

The value is passed correctly but it only refreshes when I save.
How can I make it refresh as soon as I enter the value in
txtpatient_v_protocol?

Thanks
 
Did you try putting your code in the 'Programmatic Change' event?
 
Or, in the Interactive Change event.

In my base classes, I have InteractiveChange and ProgrammaticChange BOTH call a custom method, AnyChange: That's where I'd put this code.

Or, (and this Really is my preference), I'd have the txtPatient_v_irbnumber.ControlSource=THISFORM.nIrbNumber and txtpatient_v_protocol.ControlSource=THISFORM.cProtocol, then create a custom method on the form named cProtocol_Assign, and in that method have code assigning a value to THISFORM.nIrbNumber, then call THISFORM.txtPatient_v_irbNumber.Refresh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top