Search results

  1. S

    SQL with count and where

    You're welcome! Simon B.
  2. S

    SQL with count and where

    Hi, have you tried that: SELECT qryPriRoomCode.PriRoomCode, Count(my_query.MsgUnique) AS CountOfMsgUnique FROM qryPriRoomCode LEFT JOIN (SELECT * FROM qrySyslogRoomMatch WHERE qrySyslogRoomMatch.MsgDate=Date() AND qrySyslogRoomMatch.MsgTime>DateAdd("h",-1,Time())) my_query ON...
  3. S

    Question How do I make a record read only

    Hi Sarah, You will need to go to the VBA code, in the Current Event and enter something like this: Me.AllowAdditions = Not checkbox_name.Value Me.AllowDeletions = Not checkbox_name.Value Me.AllowEdits = Not checkbox_name.Value That way each time the form is "refreshed" with another...
  4. S

    Find Duplicates

    Hi, Use this syntax for numbers (as long as you know exactly what they are). If I'm not mistaken, "LIKE" will only work for text. ((table1.field1) = [Enter Number]) ... Simon B.
  5. S

    Question How do I make a record read only

    Hi Sarah, I already did something similar to that. You can add a (Yes/No?) field to your table. You (the admin) will be the only person that can access this checkbox. In the Current (I think it's that one) event of the form you check the state of that field. If it is checked (backed-up) then...
  6. S

    Unable to export records to Excel when LIKE used in Query

    The only thing I could suggest is that you could insert a breakpoint and check that your recordset actually contains records. If your loop get skipped then that is a recordset problem, and Excel has nothing to do with it... I just did a little search and it seems that ADO uses % as wildcard...
  7. S

    outer join query and form question, please assist.

    Hi again, I think this is much prettier: SELECT Table1.* FROM Table1 LEFT JOIN Table2 ON (Table1.User = Table2.User AND Table1.Desc = Table2.Desc) WHERE Table2.User IS NULL You can join on as many fields as you want. Simon B.
  8. S

    outer join query and form question, please assist.

    Hi Jess, Here is something that works altough it really is not the best way to do it. I'll ty finding something better. SELECT * FROM Table1 WHERE (User & Desc) NOT IN (SELECT (User & Desc) FROM Table2) That creates a "key" by concatenating the 2 fields. That works but I can get pretty...
  9. S

    Search Form Variables

    Thanks a lot! I didn't know about that!!! It just made more sense to me (for readability) to use the same operator everywhere! I can certainly use that somewhere! Simon B.
  10. S

    Search Form Variables

    Hi, Here is how I would do this: define another variable for the text fields criteria (for clarity), say strTextCriteria. Then: If Not IsNull(Me!Text8) Then strTextCriteria= strTextCriteria & "[cdcause] like '" + "*" + Me![Text8] + "*" + "'" End If If Not IsNull(Me!Text10) Then...
  11. S

    Query Function

    Hi, I'm not too sure what you want to do here. Do you want to list fields from a table but have the name field formatted? If so you could simply write: SELECT StrConv(name_field, vbPropercase) AS My_Name, column_1, column_2 [...] FROM the_table That will format your name field right away...
  12. S

    Unable to export records to Excel when LIKE used in Query

    Hi, The only thing I can tell is that if the "Do Until rsNA.EOF" statement get skipped your recordset IS at EOF, and consequently contains no records to display. Now, I don't know what the LIKE operators has to do with that since I don't see it. ( is it in qryNAPOOrdersFiltered ?) Oh, I...
  13. S

    Query-ing a query

    Hi, I'm not exactly sure what field you want to have a sum on but basically your query should look something like this: SELECT SUM(column_1), SUM(column_2) [...] FROM your_existing_query GROUP BY the_date That will group the record by each different date. I saw in your example that the...
  14. S

    Access changes my fields order

    That worked. Thank you very much. Simon B.
  15. S

    Access changes my fields order

    Hi I have a query that looks go like this: SELECT *, "Last column" AS LAST_COL FROM MY_TABLE It all work fine. Then I want to create a table out of it: SELECT *, "Last column" AS LAST_COL INTO NEW_TABLE FROM MY_TABLE If I save my query and re-open it, Access has modified it into the...
  16. S

    If Null

    Here is what you could use: SELECT IIf(IsNull([MAX DISB]), NULL, Date()-[MAX DISB]) AS DAYS, ..... Basically the syntax is IIf(condition, to_do_if_true, to_do_if_false) AS field_name I don't know about your particuliar situation but I don't see why you would be interested in having a...
  17. S

    Importing a .csv file: date problem

    I found a work around: In the import spec. window, I specified a date format which cannot be associated with what I have, i.e. 15 SEP 09 cannot be converted with MYD format. That way my date format is kept. I'd still like to know why it does the conversion.... Thanks for the help, Simon B.
  18. S

    Importing a .csv file: date problem

    Every field in the table itself is text as well as in the import specification. In the text file it is also in text (..., "15 SEP 09", ...) and I have " as the text delimiter in the import specs. It seems to convert it according the the date format specified in the import spec window (YMD, -...
  19. S

    Importing a .csv file: date problem

    Sorry but no. :) My Windows default are: Short date: 2009-01-22 Long date: 22 janvier 2009 But the questions that remains: Why is Access converting my "text" dates without me asking for it? Simon B.
  20. S

    Question Installing an Access Database on to a server

    Hi, I don't want to hijack Tumby's thread, but I read that you all suggest having the back-end on the server and the front-end on the user's PC. Besides the obvious bandwith usage, is there a reason not to have the MDE also stored on the network? I think it makes updating a lot easier...
Back
Top Bottom