×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

hi all .. I have Table

hi all .. I have Table

hi all .. I have Table

(OP)
hi all ..
I have Table

Table shift
id name Daybreak morning sunset night
1 Ibrahim 1 0 0 0
2 Adam 0 0 1 1
3 Riyad 0 1 1 0
4 Othamn 1 1 1 0
======================================================================
I want to come up
======================================================================
Grid
name shfit date
dropDown To combo box : Ibrahim,Othamn Daybreak 01/01/2021
dropDown To combo box : Riyad,Othamn morning 01/01/2021
dropDown To combo box : Adam,Riyad,Othamn sunset 01/01/2021
dropDown To combo box :Adam night 01/01/2021
dropDown To combo box : Ibrahim,Othamn Daybreak 02/01/2021
dropDown To combo box : Riyad,Othamn morning 02/01/2021
dropDown To combo box : Adam,Riyad,Othamn sunset 02/01/2021
dropDown To combo box :Adam night 02/01/2021
dropDown To combo box : Ibrahim,Othamn Daybreak 03/01/2021
dropDown To combo box : Riyad,Othamn morning 03/01/2021
dropDown To combo box : Adam,Riyad,Othamn sunset 03/01/2021
dropDown To combo box :Adam night 03/01/2021
dropDown To combo box : Ibrahim,Othamn Daybreak 04/01/2021
dropDown To combo box : Riyad,Othamn morning 04/01/2021
dropDown To combo box : Adam,Riyad,Othamn sunset 04/01/2021
dropDown To combo box :Adam night 04/01/2021
dropDown To combo box : Ibrahim,Othamn Daybreak 05/01/2021
dropDown To combo box : Riyad,Othamn morning 05/01/2021
dropDown To combo box : Adam,Riyad,Othamn sunset 05/01/2021
dropDown To combo box :Adam night 05/01/2021

Thank for help

RE: hi all .. I have Table

Interesting puzzle.

You would need to expand your initial cursor, and then process it (perhaps you could do both, I'm not sure), but before you can do that
you will need some kind of date in your existing shift table, unless you mean to predict the shifts going forward from any given date


Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: hi all .. I have Table

(OP)
Thank you for your response, GriffMG
I will clarify the question through pictures



The second image is a grid in which the person’s name is entered and the dates come as a result of a code that I just made a combo box. How do different names appear with each line according to shift
thanks for the help

RE: hi all .. I have Table

That helps.

What you need are multiple cursors for each shift, I'd create them with:

CODE -->

Select id, name FROM shift Where daybreak=1 into Cursor DaybreakShift
Select id, name FROM shift Where Morning=1 into Cursor MorningShift
* and so on 

Then you can use multiple combos, one for each shift cursor and use DynamiccurrentControl to specify which one is used.

On the other side, things would work better with a usual normalization of the data.

Chriss

RE: hi all .. I have Table

You can't have the cake and eat it.

You're resetting the combo1 items with each change to another cell. But there only is one combo for column3, with sparse=.f. it's drawn multiple times, but at any time you only have the records of the active row in it, so other rows lose their data.

Go back to what I suggested, you need several cursors for each shift to pick one name from them and keep them as they are. Then switch between the combos - each with its own cursor - by DynamicCurrentControl instead of requerying in just one combo.

Chriss

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close