A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Work Pattern Look Up table



 
 
Thread Tools Display Modes
  #1  
Old November 28th, 2008, 03:55 PM posted to microsoft.public.access.gettingstarted
John Conway
external usenet poster
 
Posts: 1
Default 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  
Old November 28th, 2008, 04:18 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.