Search results

  1. J

    INSERT Statement in Form

    Try: insert = "INSERT INTO Baustelle " & _ "(Projektname, Kunde, Adresse, Auftragsnummer, Division, Projektleitung, Bauleitung, Baustellenstart, voraussichtlichesEnde, erledigt) VALUES " & _ "('" & Projektname.Value & "'," & KundeID & "," & AdresseID & ",'" & Auftragsnummer.Value & "','" &...
  2. J

    Sample Date Functions

    Great stuff, one suggestion thou is to modify this: Private Sub cmbFunction_AfterUpdate() Me.txtReqDate = Eval(Me.cmbFunction & "(" & Format(Me.txtBaseDate, "\#mm\/dd\/yyyy\#") & ")") End Sub so that it works internationally JR
  3. J

    Question for Sql (HOT)

    The answer would be regional settings, to get around the issue when creating SQL you can use the str() function which converts the comma to dot which SQL understand. see this link: http://www.access-programmers.co.uk/forums/showthread.php?t=220498&highlight=str+function JR
  4. J

    Browse for folder/file dialogue box in VBA ?

    If you want to use Excel to browse for files, then create an excel object to get methodes of excel application ex: Dim Filter As String, Title As String, msg As String Dim i As Integer, FilterIndex As Integer Dim Filename As Variant Dim objExcel As Object Set objExcel =...
  5. J

    Trim/Remove line breaks from every field in every record

    Is it not easier to test fld.Type properties and test for text field since that's where Cr and Lf would be If fld.Type = 10 Then 'do replacement End If perhaps also in memo fields if that's required fld.Type = 12 Just a thought Edit: In the use of DJKarls code example which uses...
  6. J

    missing operator in vba

    You don't actually have to "see" it in the listbox/combobox, but you have to match the columncount with the number of columns you have defined in the rowsource SQL. You can hide certain columns by setting the column withs to zero. ex: ColumnCount: 4 Column Withs: 0;2cm;0;2cm Here column 2...
  7. J

    Workbook.SaveAs method not working in Excel 2010

    I'v tested the code and in Excel 2010 with Windows XP everything was ok, but when I tried it in Windows 7 this is my result: Private Function test() SaveExcel ("d:\test1.xlsx") 'Works ok SaveExcel ("c:\somesubfolder\test1.xlsx") 'Works ok SaveExcel ("c:\test1.xlsx") ' does NOT...
  8. J

    missing operator in vba

    What is the column Count property of the listbox, is it 7 or more?? JR
  9. J

    missing operator in vba

    If lstCurrentRetail.Column(6) is a number: strSql = "UPDATE tblItems " & _ "SET StockQTY = ([StockQTY]+1) " & _ "WHERE [ItemsID] = " & Me.lstCurrentRetail.Column(6) CurrentDb.Execute strSql, dbFailOnError If it is text: strSql = "UPDATE tblItems " & _ "SET StockQTY = ([StockQTY]+1)...
  10. J

    Concatenate fields

    For this you can use Nullpropagation: Name_ID: (compl01 + ",") & (compl02 + ",") & (compl03) Any field inside the perens that evaluates to null the whole expression inside the perens gets evaluated to null (it dosen't show) However fields like compl01, compl02 ect reeks of a denormalized...
  11. J

    How to call a procedure from a module in Access 2010..???

    If you want to call and use code, you can't use WEB-forms, only in client-forms is code availible, sorry JR
  12. J

    Type-not defined error after conversion.

    ADO is no longer default in access 2010 but DAO is so you are missing a refrence to this library. under Tools -> Refrences Locate your missing ADO library. JR
  13. J

    [MSACC2010] Password protect backend?

    Yes if the hacker knows the password to the BE then you can't stop them messing about, that goes for all systems. Just don't supply the password in the connectionstring in MsysObject table, that is easy to access for the outside. JR
  14. J

    After Splitting and Linking Table, VBA Error

    Taken from Access Help files: so: Set rstsource = DB.OpenRecordset("Codes", dbOpenDynaset) or Set rstsource = DB.OpenRecordset("Codes") JR
  15. J

    Navigation Form referencing ?

    Does this help: http://www.utteraccess.com/forum/Navigation-Form-t1994410.html JR
  16. J

    ProperCase with Hyphens/Brackets in between

    It's just a test to see if the function works as intended, and you see that there is a string argument between the perens, when you call TestSuperStrConv it prints out the result in the immediatewindow. You do not need it so you can remove it for your project. JR
  17. J

    Dlookup Multiple Criteria

    No problem, happy to help JR
  18. J

    ProperCase with Hyphens/Brackets in between

    VillaRestals code expect an argument so modify your call to Me![WorkOrderDescription]= SuperStrConv(Me.workOrderDescription) JR
  19. J

    Dlookup Multiple Criteria

    Open up a recordset and get all 3 in one go. ex: With CurrentDb.OpenRecordset(" SELECT Underwriter,region,Line" & _ " FROM tblPolicyPrefix" & _ " WHERE PolicyPrefix ='" & Left(Me.Policy_Number, 3) & "'") If .RecordCount > 0 Then...
  20. J

    Compile Error - can't figure out why

    Another way that do not need refrences set to DAO is to use a With block that points to a hidden refrence to DAO ex: Private Sub Combo0_NotInList(NewData As String, Response As Integer) Dim strMsg As String strMsg = "'" & NewData & "' is not in the list. " strMsg = strMsg & "Would you like to...
Back
Top Bottom