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!

Adding info to a Lookuptable(select)

Status
Not open for further replies.

C7ROOKIE

Programmer
Nov 18, 2010
2
US
1) Thank you Shankar for the info on my 1st lookup problem.
It worked out great!

2) On my payroll program I am using a lookup(select) table to look up the employees. As I look up each one I need to show a mark ( like *) next to each empoyee as I select them.
How do you add info to a lookup table. The marker needs to go away when I exit the program.

Thanks.
 
Hi!

Is this all in a browse or a form? Are you using ABC or Legacy?

The ideal way is to use a Queue i.e.

1. Define a Queue ::

EmpQ QUEUE,PRE(EQ)
EmpNo STRING(10) ! change this to the correct type
END

2. Free the Queue on entry to the procedure ::

FREE(EmpQ)

3. When a Employee is selected, add it to the queue and refresh the browse ::

EQ:EmpNo = <EmpNoInTable>

ADD(EmpQ, +EQ:EmpNo)
IF ERRORCODE() THEN MESSAGE('EmpQ : ' & ERROR()).

4. For displaying the selected employee on the Browse, define a local variable and add it to the Browse. Then, in the correct embed before the List Box is populated (for ABC, it is SetQueueRecord - before Parent Call and for Legacy, it is Format an element of the Browse queue), see if the Employee is selected and assign the local variable ::

CLEAR(EmpQ)
EQ:EmpNo = <EmpNoInTable>
GET(EmpQ, +EQ:EmpNo)
IF NOT ERRORCODE() THEN <LocalVar> = '*' ELSE <LocalVar> = ''.

Regards

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top