If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Work Pattern Look Up table
I would like to create a work pattern look up table. To create this I need to
generate every available option of Y and N in a 7 character e.g. starting with YYYYYYY and ending with NNNNNNN and including every version of Y's and N's in between. Is there a pre-written function that could do this or would I need to write a macro? |
#2
|
|||
|
|||
Work Pattern Look Up table
I'm not sure it's possible using a macro. I think you'll need VBA.
Another approach is to create a table that contains a Boolean field. Call the table YesNoTable, and the field YesNoFIeld. Populate the table so that it has two rows: one that's True and the other that's False. Create a query with the following SQL: SELECT IIf(T1.YesNoField, "Y", "N") & IIf(T2.YesNoField, "Y", "N") & IIf(T3.YesNoField, "Y", "N") & IIf(T4.YesNoField, "Y", "N") & IIf(T5.YesNoField, "Y", "N") & IIf(T6.YesNoField, "Y", "N") & IIf(T7.YesNoField, "Y", "N") FROM YesNoTable AS T1, YesNoTable AS T2, YesNoTable AS T3, YesNoTable AS T4, YesNoTable AS T5, YesNoTable AS T6, YesNoTable AS T7 That will return the 128 possible combinations for you. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "John Conway" John wrote in message ... I would like to create a work pattern look up table. To create this I need to generate every available option of Y and N in a 7 character e.g. starting with YYYYYYY and ending with NNNNNNN and including every version of Y's and N's in between. Is there a pre-written function that could do this or would I need to write a macro? |
Thread Tools | |
Display Modes | |
|
|