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  

Query problem



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2004, 05:50 PM
MBison80
external usenet poster
 
Posts: n/a
Default Query problem


Hi all,
I have this problem with a subform in that it will not open/refresh
with a blank/new record for the user to use. I suspect it is because of
this recordsource...


SELECT DISTINCT tblCalendar.MainProj, tblCalendar.Project,
tblCalendar.Issue, tblStatus.DueDate
FROM tblCalendar LEFT JOIN tblStatus ON tblCalendar.CalID =
tblStatus.CalID
WHERE (((tblStatus.DueDate)=[forms]![frmcal].[calendar0].[Value]));

when it is not DISTINCT the new record row is there however I would
like to have the form only display distinct records BUT I would also
like it to have a blank record for the user to fill in. Is there a way
around this ?

Thanks in advance,
Mitch...


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2  
Old May 4th, 2004, 07:08 AM
John Vinson
external usenet poster
 
Posts: n/a
Default Query problem

On Mon, 3 May 2004 11:50:31 -0500, MBison80
wrote:

when it is not DISTINCT the new record row is there however I would
like to have the form only display distinct records BUT I would also
like it to have a blank record for the user to fill in. Is there a way
around this ?


Nope.

No DISTINCT query can ever be updateable, because the individual
records that you see are each (potentially) composite records - if
there are six records with identical values for the selected fields,
you'll only see one of them, and it's undefined WHICH one you see.
Since Access cannot unambiguously determine which record to update, it
won't let you update (or insert!) any.

Any way you could use a subform and update the one and many side
tables separately?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #3  
Old May 5th, 2004, 06:00 PM
MBison80
external usenet poster
 
Posts: n/a
Default Query problem


Thanks John,
i've taken your advice, i've set up a hidden subform with a form that
displays the records without the Distinct in the query and it is
visible only when the user decides they want to add a new record.

Thanks again...


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

 




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 12:59 AM.


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