Search results

  1. J

    calculated fields cant see in the database

    You're window's setting for decimal seperator is most likely a comma and not a period, just replace .75 with 0,75 Quota_Totale: ([TotaleAdulti]+[TotaleRagazzi]+[TataleBambini])*0,75 JanR
  2. J

    Run time error '13': Type Mismatch

    list over Excel constants: https://msdn.microsoft.com/en-us/library/aa221100(office.11).aspx JanR
  3. J

    Changing all ZLS in a table to Null

    Set the property "AllowZeroLength" of the field(s) in your table to No. To do it to all your tables se this: http://allenbrowne.com/bug-09.html good luck Jan R
  4. J

    Help with Access IF Statement

    This is better suited for the Switch() function. ex: DisplayText: Switch([Age-CRD]<=5,"0-5",[Age-CRD]<=10,"6-10", .... ,[Age-CRD]>365,0) Good luck Jan R *edit Wrong final argument
  5. J

    How to prevent (lock) the deletion of a column in a subform in Datasheet view?

    In Access 2010 accdb I can delete a Column/Field even in form view by right clicking the column and choose delete, or simply press the delete button. I suspect this for the developer to quickly remove a field you don't want instead of going into designmode of the form. To undo this action...
  6. J

    Updating a local table from a linked table workaround

    Enclose amazon-order-id in square brackets like so: [amazon-order-id] JanR
  7. J

    XIRR for non-periodic dates and flows by investment

    SelectSql = "SELECT CFlow, TDate FROM XIRR_Array WHERE [Match Code]= 'MatchCode' ORDER BY TDate" This select statement is looking for records in your table XIRR_ARRAY where the field Match Code is equel to the literal string 'MatchCode' and yopu probably don not have any records there, so...
  8. J

    Access VBA code to open & sort excel sheet

    With oBook.Sheets(1).Range("C2", oBook.Sheets(1).Range("C" & oBook.Sheets(1).Rows.Count).End(xlUp)) If you are going to use late binding, you have to tell Access what the value of xlUp is. This is an Excel spesific constant. either. Const xlUp As Long = -4162 or declare it as a Public...
  9. J

    Save a Table as text Instructions

    Here is a start: http://allenbrowne.com/func-06.html Jan R
  10. J

    Combine Date and Time column

    You don't concaenate date and time, you ADD them together, to get date and time =M1+N1 Janr
  11. J

    When is the "OpenDatabase" Method Needed?

    This methode is for ADO right Galaxiom? since DAO do not have a .State property as far as I know. But I can however perhaps do something like this to be sure that recordsets as closed after I'm done with the DAO Recordset Set rs=Currentdb.OpenRecordset("whatever") ..... do whatever rs.Close...
  12. J

    When is the "OpenDatabase" Method Needed?

    But what if you get an error within your with-block? On Error Goto Handler With CurrentDb.OpenRecordset(SQL) Do While Not .EOF ... .MoveNext Loop .Close End With ExitPoint: Exit Sub Handler: msgBox Err.Number Resume ExitPoint End Sub Dosen't that leave the recordset...
  13. J

    Append record if exist or Update if not exist

    Access do not support a full outer join. Change til to either Right Join or Left Join. In your case I think you need Left Join Also use your real table names marked in blue UPDATE <Destination table> As A LEFT JOIN <Source table> As B ON A.aaa = B.aaa AND A.bbb = B.bbb AND A.ccc = B.ccc AND...
  14. J

    Locking a Form once data has been entered

    Avoid the problem by issuing your sequence number only for new records. ex: If Me.NewRecord then Me.Seqence = Nz(Dmax(.....),0) + 1 End If Jan R
  15. J

    removing zeros

    @sneuberg Why go to all that trouble, Format()-function already turns the date into a string. JanR
  16. J

    removing zeros

    Have you tried the Format() function? Format(YourDatefield,"d\/m\/yyyy") or Format(yourdatefield,"m\/d\/yyyy") depended on which "number" is day and which "number" is month JanR
  17. J

    Can't get to SQL view

    You can type this in the immediate window ?currentdb.QueryDefs("Nameofquery").SQL and hit the enter button and your sql will print out, do yor corrections and paste it into a query JanR
  18. J

    Vba Insert into tbl

    DoCmd.RunSQL "INSERT INTO JobsStaffAvail ( tblJobsID, tblStaffAvailID, bookedBy )" _ & "VALUES(Forms!frmbookstafftojob.JobsID ,Forms!frmbookstafftojob.subfrmStaffAvail.Form.staffid , BookedBy)" Yes Minty, you can do it like OP did, provided you use DoCmd.RunSql and not execute methode...
  19. J

    Escaping # chr(35) in an sql

    A shot in the dark. Your fieldname "Desc" in your insert statment is a SQL reserved word. Put square brackets around it. Const sqlM = "INSERT INTO tempImplantManagement " & _ "( DOS, PName, RName, ImplantLight, AbutLight, FinalLight, [Desc]) " & _...
  20. J

    Type Mismatch Error

    Wrap DLookup using the NZ() function to handle nulls. ex: If Nz(DLookup(.......),"") = "" Then ... I would just open a recordset and test if there are any records, if so you open Form1 ex: Private Sub Command1_Click() With Currentdb.OpenRecordset("Select * From User Where Username = '" &...
Top Bottom