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

Look Up Table Access Other than Ctrl Spacebar 1

Status
Not open for further replies.

Bystander

Technical User
Sep 4, 2001
112
GB
I find it difficult to get new users into the habit of using Ctrl Spacebar for lookup help.

Most other databases automatically call up a lookup table from a mouse click and enter lookup values from a mouse click or via drag and drop. Can anyone suggest a way that that functionality can be replicated in forms designed in Pdox 7 and above? The closest I have got is calling a "lookup form" attached to the lookup table and then edit-paste, but that is too cumbersome.

Many thanks for your time.
 
Create a button on the form.

Attach the following code to the push-button event:

method pushButton(var eventInfo Event)
//#formdata1 is the explicit name of the form.
if #formdata1.editing then
action(DataLookup)
else
msgStop("STOP", "Change from read-only to edit mode, then try again.")
endif
endmethod

Tell the user to click on this button while their cursor is on a field that retrieves values from a look-up list.
 
Thanks Ijprivara. The solution worked perfectly. It had been bugging me for a good few years. I was trying copy to array and copy from array and all sorts of things. I better look into the Pdox helpfiles a bit better next time.

Many thanks again.

Bystander
 
If its a single field lookup, another way is to make the field into a dropdown edit field, then in the object explorer get to the list object under the field (usually called #listnn which you can't change) then add this code to its open method

self.DataSource = "[tablename.fieldname]"

Richie

 
just catch the event in your field you want to and call the action(DataLookUp).

For example on mouseclick just write action(DataLookUp).



 
Thanks Thies I think I will capture it in a mouserightup event.

Regards

Niyi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top