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

New in PB - please help

Status
Not open for further replies.

bbone

Programmer
Aug 18, 2003
10
SI
Hi!

I just started using PB and i'm using PB5. Don't ask why.
Problem is that i can't acces controls from one window to another, for example in window w_name:
w_name1.st_name.text = ... or
w_name2.dw_1.insertrow(0)

In both cases i get error message null object referenced. Can you please tell me why and how to do it?
Thanks!
 
thats how PB behaves...PB is different to VB.

correct way is to use open() or openwithparm() functions to open the window and then referenec the controls in the window
 
First, you must check if the window you are referencing is valid. Your code may look like this:

IF IsValid(w_name1) THEN
w_name1.st_name.text =
END IF

IF IsValid(w_name2) THEN
w_name2.dw_1.InsertRow(0)
END IF

Hope this will help.
 
Thank u!
I figured out that a window must be opened to access its controls.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top