Search results

  1. G

    Using Minus operator

    You can try this : strsql = "select HeadingID from lkupHeadings where NOT EXISTS (select HeadingID from lkupobjectives where lkupobjectives.HeadingID = lkupHeadings.HeadingID [StaffNumber]='" & Environ("Username") & "'" Or NOT IN or just a plain old left join. In any case, Access doesn't...
  2. G

    DateAdd Function in a Computed Querry

    I'm from Belgium and we use the , also as decimal point. I haven't ran into a similar problem yet (Maybe a good time for me to see this post before pulling my hair out) Most of the time I use calculated fields on the form itself. And if i need SQL i write the full statement in VBA code. I don't...
  3. G

    DateAdd Function in a Computed Querry

    Does a delimiter in VBA changes from location ? If it is grats to the guys who wrote the compiler... the official help say to use "," for that specific function. But I can be wrong
  4. G

    DateAdd Function in a Computed Querry

    Maybe take a quick look at this : http://www.techonthenet.com/access/functions/date/dateadd.php So you need to use a comma. Then I think the code returns an error because "y" isn't valid. Try it with the correct syntax and give it a try. DateAdd("yyyy",5,[Datentry])
  5. G

    hey

    Words like "URGENT" and "ASAP" sounds like "this is a school homework and i didn't listen to the teachers class" There are pretty good tutorials out there who teach you in 5 minutes the difference between all the joins that you can make...
  6. G

    VBA SQL with SELECT Statement

    Not 100% sure what you try to explain with that is null. But here is what i guess : "select * from tblecalendar where (assigned = '" & userLevel & "' and (finalreport="&finalDate&" or finalreport is Null) Order by auditid" So what i think the problem is that you didn't put the last criteria...
  7. G

    Get email addresses from table

    OpenRecordset("table") is actually DAO... If you used ado you would need a connection string. Something like this : Dim rs As New ADODB.Recordset Dim strSql As String strSql = "SELECT * FROM Table1 WHERE Field2 = 33" rs.Open strSql, CurrentProject.Connection Do...
  8. G

    Get email addresses from table

    I prefer DAO over ADO. I don't understand why you say that it is not needed... Dim dbs As DAO.Database Dim rsSQL As DAO.Recordset Dim strSQL As String Set dbs = CurrentDb 'Open a snapshot-type Recordset based on an SQL statement strSQL = "SELECT * FROM Table1 WHERE Field2 = 33" Set rsSQL =...
  9. G

    Cdate problem

    Why try to make a date like that ? If you have 3 different fields you can do this : TDAY = DateSerial(Me.Combo25,Me.Combo21,STR(S1) (You still need to test off course the values are valid.)
  10. G

    Consealing Everything but the Access Forms

    A quick search on the interweb gave me this link : http://www.access-programmers.co.uk/forums/showthread.php?t=217400 Maybe it can do what you try to achieve.
  11. G

    Manipulate test string

    Yes you can rename that 's'. Just make sure you replace all the 's' in the code by that new name. There are 2 declarations on that first line. One is to tell that the 's' must be a string. (the parameter of that function cannot contains numeric characters) The second one is to tell what the...
  12. G

    Front End; Dead End

    UNC : uniform naming convention It is a path that any computer in your lan understands. It is recommended to use paths like this "\\Fileserver\Bob" instead of mapping the Fileserver to a drive letter. Same reason why domain names exists on the internet. Would be a world of anarchy if we used...
  13. G

    Changelog in Access?

    Best way is to make a table and save the history in there. Here is a pretty complete example : http://www.techrepublic.com/article/a-simple-solution-for-tracking-changes-to-access-data/ All you need is 1 table and 1 function so that is pretty simple.
  14. G

    Find closest match between 2 tables

    Don't you get problems like selecting the first record that is bigger ? For weight 23,000 i get A1... it should be A4. It should not only select a bigger load but also the closest one i guess
  15. G

    Add Blank rows & text

    Do you need a macro or a Button with a form ? Is it hard coded that you must insert x lines after group A ? I guess you need a form to enter the number of lines that needs to be inserted. And after what group.
  16. G

    Dependent query

    First extract the scores for that particular year select * from ScoreTable where ScoreYear =2016 Then you can perfectly do a new query select * from ScoreTable where ScoreYear =2016-1 If you want this in one single query, just do where ScoreYear=2016 or ScoreYear=2016-1 (You need to change...
  17. G

    "Not In" Query "Not Working"

    Did you try both select's without left join first ? Like what results do you get if you just do SELECT dUserFK,dCatFK FROM Q_Defects WHERE dDeptFK=Forms!F_MainMenu.cboSelectDept Then ask yourself, is this the data i need ? If yes, then check that the PK matches with the FK. Also if you use...
  18. G

    Problem with max DB size

    Make sure you use a recent version of SQL Server Express. (2008 or 2012) They support a size of 10 GB per database.
  19. G

    "Not In" Query "Not Working"

    This will not work. You need to add the dUserFK in the SELECT of your left join... It is not because you select 1 field that SQL knows what all the other fields of that table are. So try this : SELECT Q1.uUserName, Sum(IIf([Q2].[dCatFK]=1,1,0)) AS AM, Sum(IIf([Q2].[dCatFK]=2,1,0)) AS PM FROM...
  20. G

    Slickest way to duplicate queries with 'replaced' SQL content

    So you kind of guess and hope that the line of that article with that price is actually yours ? What if i sell the same article at the same price ? You wouldn't know if it is yours or not ?
Back
Top Bottom