Kostas Konstantinidis
kost36 at otenet.gr
Tue Oct 14 13:18:34 CDT 2008
Hi Mark, yes it realy works many many thank's /kostas ----- Original Message ----- From: "Mark A Matte" <markamatte at hotmail.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Tuesday, October 14, 2008 6:41 PM Subject: Re: [AccessD] print via check boxes.. > > Kostas, > > Ok....way out of the box...and I'm hoping for some criticism from some of > the more experienced here. > > I didn't really care for the table design in this...but here we go. > > I created 2 tables: > > tblJobs with 6 fields: Name, Billiards > Pro,Doctor,Engineer,Analyst,Inventor > the last 5 fields are your check boxes. > > tblJobTitle with 1 field: JobTitle > this table has 5 records...1 for each of your check boxes...the values in > the field are the exact names of the check boxes: Billiards > Pro,Doctor,Engineer,Analyst,Inventor > > I then created a function: > > Function MyJob(MJ, MM) > Dim MyLookup > MyLookup = DLookup("[" & MJ & "]", "tblJobs", "name ='" & MM & "'") > MyJob = MyLookup > End Function > > Then use a cartesian join and call the above function passing the name and > jobtitle to the function. > > > *********SQL************* > SELECT tblJobs.Name, IIf(myjob([jobtitle],[name])=-1,[jobtitle],"") AS > Jobs > FROM tblJobs, tblJobTitle > WHERE (((IIf(myjob([jobtitle],[name])=-1,[jobtitle],""))<>"")) > ORDER BY IIf(myjob([jobtitle],[name])=-1,[jobtitle],""); > *********SQL************* > > > I don't know that this is the 'correct'/'cleanest' approach...but it does > give the results you described. > > I hope for comments on this one...seems like it would be a usable > technique if cleaned up...but rarely needed. > > Thanks, > > Mark A. Matte > > > >> From: kost36 at otenet.gr >> To: accessd at databaseadvisors.com >> Date: Mon, 13 Oct 2008 22:33:21 +0300 >> Subject: Re: [AccessD] print via check boxes.. >> >> Mark, >> all the project is based on just one table >> with (except names, addresses, phones etc) >> 10 different check boxes like >> 1. journalist >> 2. Technician >> 3. Actor >> 4. Doctor etc.. etc >> >> e.g Kostas may be working both as a jurnalist and a technician too >> so when I ask for a list with journalists Kostas must inclouded there >> and the he same when I want to ask for a list with technicians, too >> Hope that was more understandable >> >> thank's >> /kostas >> >> >> >> >> ----- Original Message ----- >> From: "Mark A Matte" >> To: "Access Developers discussion and problem solving" >> >> Sent: Monday, October 13, 2008 10:05 PM >> Subject: Re: [AccessD] print via check boxes.. >> >> >>> >>> Kostas, >>> >>> I think I understand the question...but not sure... >>> >>> When you are selecting these jobs on the form...does it store 1 record >>> per >>> job...or 1 record with the jobs in different fields. If you could give a >>> small example of how the data is in the table...I think the answer is >>> close. >>> >>> Thanks, >>> >>> Mark A. Matte >>> >>> >>>> From: kost36 at otenet.gr >>>> To: accessd at databaseadvisors.com >>>> Date: Mon, 13 Oct 2008 20:24:19 +0300 >>>> Subject: [AccessD] print via check boxes.. >>>> >>>> Hi group, >>>> >>>> I use a simple form, keeping for a small club >>>> various demographical data . >>>> >>>> The point is 10 check boxes inclouding into the same form >>>> something means 10 different jobs category. >>>> So, is it possible to need to check more than one or two >>>> check boxes for the same record >>>> >>>> What I need is to make a report which will print lists >>>> depending of the checked boxes so the person's name with two >>>> or three different jobs to be able to appear in every separated list >>>> >>>> many thank's >>>> /kostas >>>> -- >>>> AccessD mailing list >>>> AccessD at databaseadvisors.com >>>> http://databaseadvisors.com/mailman/listinfo/accessd >>>> Website: http://www.databaseadvisors.com >>> >>> _________________________________________________________________ >>> Get more out of the Web. Learn 10 hidden secrets of Windows Live. >>> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 >>> -- >>> AccessD mailing list >>> AccessD at databaseadvisors.com >>> http://databaseadvisors.com/mailman/listinfo/accessd >>> Website: http://www.databaseadvisors.com >>> >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com > > _________________________________________________________________ > Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. > http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > >