I'm at a loss as to what to search on for this. I have a form with client notes, including 'clientid'. I have a command button that, when clicked, it will open another form to add a new notes for the same client. I want to carry over just the 'clientid' to the new form and nothing else.
I've...
When I type it into the SQL window as written it runs correctly the first time but, when I save it and try to run it again, I get the same error message and the SQL has changed line format. Here is how it looks when getting the error on the second example you sent.
SELECT N.clientid, C.lname...
This?
SELECT N.clientid, C.lname, M.MaxDate AS NoteDate, N.note
FROM (tblclients AS C INNER JOIN tblnotes AS N ON C.clientid=N.clientid) INNER JOIN [SELECT clientid, Max(notedate) AS MaxDate FROM tblnotes GROUP BY clientid ] AS M ON (N.clientid=M.clientid) AND (N.notedate=M.MaxDate);
Error message "...cannot find the input table or query "SELECT clientid, Max(notedate) AS MaxDate FROM tblnotes GROUP by 'clientid'. Make sure it exists...
I'm getting the same error message using the alias as well.
Thanks
Thanks for the quick response. I see that you've added table "M" do I need to create a new table to accommodate MaxDate? I'm getting an error message as written and did build another table M but getting same error. "...cannot find the input table or query "SELECT clientid, Max(notedate) AS...
I'm trying to run qryNotes to just show the latest records for clients. Everything I've looked at points me to using "Last" or "Max" but I always get the error "You tried to execute a query that does not include the specified expressions expression 'clientid' as part of an aggregate function"...
Got it - thanks for all the help. Just getting back into Access and new it was a simple thing that I just couldn't remember!
stLinkCriteria = "[clientid]=" & Me![cboname]
Thanks for the reply, what you stated makes sense and I've changed my code but am still getting the same error. I've checked the spelling in all of my fields against the tables and query and it all matches perfectly. I'm thinking I need to try it with a SQL string and see if that approach will...
I'm sure I posted this last week but it is no where on the forum to be found so I'm trying again.
I am trying to do a simple thing with stLinkCriteria and it simply will not work. I am getting the error "..Access cannot find the field 'clientid' referred to".
Private Sub Command2_Click()
Dim...
There is one FAQ regarding connection strings and it points to a website that happens to be where I did get my connection string from. I guess I will just assume that it's correct and that I have a different issue. Also, since there was no comment on my web.config, I'll assume that was correct...
I posted the web.config info prior to removing the 2nd "Data Source" line. I am getting a cannot connect error.
<appSettings>
<add key="connectionstring" value="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Usawvxx01\materials.com\ToniTest\CostSavings\data\CostSavingsProjects.mdb...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.