[AccessD] Query based on form AND subform

John Clark John.Clark at niagaracounty.com
Thu May 20 09:46:27 CDT 2010


that is what I was trying, and it didn't work, for some reason. I just created it, so there shouldn't be any join or anything, but w/I added it, it always gave me zero records.
 
What I ended up doing, is create a query from query from the table, and it let me mix the queries together, into a 3rd query. It was like doing a union query...this is what I was gave me the inkling to do this, in the first place. It let me do this, and it works great...don't know why, and it doesn't seem right, but it works. I even tried meshing the query I had, w/the info table...skipping the extra query step...but that didn't work either.

>>> "Stuart McLachlan" <stuart at lexacorp.com.pg> 5/20/2010 7:44 AM >>>
If there is only one record in tblTreasInfo,  just include it in the query, but don't try to create 
any sort of join on it.   That will make all of the fields in it avaiable to the query. (effectively, 
you are doing an "outer join")

I do this frequently with a tblSysFile which contains various reasonably constant fields.
(I normally create a numeric PK with the number 1 in it and set a Validation Rule "=1" so that 
you can't accidentally get a second record in the table.

-- 
Stuart


On 20 May 2010 at 7:28, John Clark wrote:

> Now, let me add this into the mix... On this certificate, there is
> information about the student (main form), the certificate (sub form)
> ...AND...there is data that is relevant to the office (i.e. Address,
> Treasurer's name, title, etc.). It is unlikely that they will move,
> although they have moved since I've been here. But, it isn't all that
> unlikely that the name might change...it is an elected position AND we
> actually just had a change, due to retirement. And, I am expecting a
> title change, because I believe things are in limbo right now, so I
> think there are some technicalities w/the title. In any event, I
> thought it best...or at least a nice touch that would save me time in
> the future...to have certain items on this report link to a table that
> can be edited, via form, by the user. The data for the report comes
> from a query that presents information based on the current user shown
> on the form. So, how can I get to this "extra" data...the treasurer's
> name and stuff, which is just sitting in a table? The table is
> "tblTreasInfo" by the way. I tried adding this to the query, but what I
> thought would happen, did happen...it showed no records. 
> 
> 
> 
> -- 
> 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



More information about the AccessD mailing list