Search results

  1. A

    Update Query giving me a runtime error 3061

    Try.... SQLWhere = " WHERE tblPersonalInformation.PersonalID = " & Forms!frmMain!txtCandidateNumberReadOnly & ";"
  2. A

    Difficulties with getting the right responce from my queries

    Date query: SELECT Order.OrderID, Order.OrderDate FROM [Order] WHERE (((Format([OrderDate],"mm"))=12)); This'll give you the orders in dec. -------- SELECT Company.CompanyID, Whisky.RegionID FROM (Region INNER JOIN Whisky ON Region.RegionID = Whisky.RegionID) INNER JOIN (Bottling INNER JOIN...
  3. A

    Query Delete Statement - Date field problem

    Are you deleting the record based on the date.. If so & you are doing it from code, use SQL...."WHERE (((Table1.Datefield)=#" & Format(Me.txtdate, "mm/dd/yyyy") & "#));" even if txtdate is in uk format it will still delete the correct record...
  4. A

    Minimum Date with group by

    Cheers...thats just what I just thought of...my only hessitation was the fact that the dates could be the same...so I had to do another query with min ID...don't things get complicated! Thanks for everyones help..
  5. A

    Error in switchboard (opens macro that stats vba code)

    You might be closing the database(at your end), before the code has been executed.... Might be worth closing the database in ZZZ_Totaal or incorperating the database in the Switchboard database...
  6. A

    Minimum Date with group by

    Cheers George, The problem is it's not always the max ID, the returned results are... ID1 | MinOfDate | MaxOfID -------------------------- 1 |19/01/05 | 3 2 |20/01/05 | 5 Not.... ID1 | MinOfDate | MaxOfID -------------------------- 1 |19/01/05 | 3 2 |20/01/05 | 4 SQL...
  7. A

    Query with complex joins (sub-query)

    Not sure without looking at any data but will this work? SELECT Table_AreaAbbrs.AreaAbbr, Table_AreaAbbrs.AreaID, Table_Grantees.SDPINShort, Table_Grantees.SDPINumber, Table_FormLogInfoGrantees2004.FormRequired, Table_FormLogInfoGrantees2004.FormRequiredComments, Table_Grantees.SDPIName1...
  8. A

    Minimum Date with group by

    I wondered if anyone new how to return the following Table of Data ID|ID2|Date ---------------- 1 | 1 | 20/01/05 2 | 1 | 21/01/05 3 | 1 | 19/01/05 4 | 2 | 20/01/05 5 | 2 | 25/01/05 I want to return the minimum date grouped by ID2, but with the corresponding ID i.e. ID|ID2|Date...
  9. A

    OpenDatabase Method

    Hi, It must be because you have set a new instance in the first procedure i.e. New Access.Application Out of interest, why are you opening & calling external dB's, can you not group these dB's together?..
  10. A

    Help please...

    Hi, Now stay with me on.... Query1: field1ID(key),field2ID, field3(Date) field1ID=autonumber field2ID=ref to another table(table ID field) field3 = date How do I return field1ID,field2ID,max(field3) without returning all fields(because I can't use 'Groupby' with field1) Heres some data to...
  11. A

    Check to see if table exists

    '******************** Code Start ************************ 'This code was originally written by Dev Ashish. 'It is not to be altered or distributed, 'except as part of an application. 'You are free to use it in any application, 'provided the copyright notice is left unchanged. ' Function...
  12. A

    Message Box behaving weirdly

    Good morning, I think I've figured it.... If strFile dosn't exist, sBackupPath = strFile Check to see the correct file path is being entered....try simplifiying the code & forget about the copying for now....
  13. A

    Message Box behaving weirdly

    ...confused... when I tried a basic version of your code, it returned correct sBackupPath & sBackupFile... Dim sSourcePath As String Dim sSourceFile As String Dim sBackupPath As String Dim sBackupFile As String Dim strFilter As String Dim strFile As String 'strFilter =...
  14. A

    Message Box behaving weirdly

    what does strFile return?
  15. A

    ' character at the beginning of excel cell

    Hi, I have posted this thread before, but still have not found a solution...... I'm trying to export a query/table to excel from access. I understand the "TransferSpreadsheet"/export method, but when this method is executed, the excel sheet displays the ' character at the beginning of each...
  16. A

    SQL query checkbox prob

    Hi, What I'd do is to create comboBox's.... RowSourceType = Value List RowSource = 0;No;-1;Yes ColumnCount = 2 ColumnWidths = 0cm;2cm ..and then get the vba code to look at the comboBox's
  17. A

    disable menu option

    .... If ..... then Application.CommandBars("NameOfMenuBar").Controls("NameOfControl").Enabled = False End If
  18. A

    Searching for a record with VBA

    Hi, Do you know about DAO? If you make a reference to MS DAO, then, if you copy the following into the form code; Sub SelectCurrentBeg_DAO(dBegid As Double) Dim rst As Recordset Set rst = Me.RecordsetClone rst.FindFirst "Begid = " & dBegid Me.Bookmark =...
  19. A

    different color for line in listbox

    The only way I know of doing this is to use a Continuous subform not a listbox. With a subform, you can use conditional formating i.e. change colour on value. You can make a textbox to the size of the row, send the texbox to the back & set the conditional formating on this texbox. The only...
  20. A

    Use of custom controls

    Hi, Are you programming in access? If so why create custom controls, will a listbox not do the job? You can monitor a list box for choices made, store the choice, reset listbox after the choice has been made etc.
Top Bottom