Search results

  1. D

    How to carry over to new line

    If Paul's suggestion is not applicable and this all has to be in one table, I think there is a limit on the number of characters in this type of SQL string. What happens if you cut this in half (halve the number of fields), does it run then? David
  2. D

    How to carry over to new line

    your syntax currently is only suitable for string data types, if your quantity objects are numbers, this code will fail. For numbers you need to use: " & Me.quantity & " or '" + str(Me.quantity) + "' works as well
  3. D

    How to carry over to new line

    can you please post all of the offending line(s) of code and use code tags, I suspect it's nothing to do with carrying over, but data type syntax David
  4. D

    How to carry over to new line

    do you mean carrying over the code to a new line, use this "INSERT INTO tablename(a1, a2, a3, a4, " _ & ",a5, a6)"
  5. D

    Limit a field to only Alpha Numeric

    If you use Ling's method to check first/last characters, do you not need to declarer the function as: Public Function CheckFirstLast4AlphaNumeric(strValue) As String without the 'As String' I wouldn't expect it to return a value David
  6. D

    Limit a field to only Alpha Numeric

    The original function works by inspecting each character in the string and the postion of each character, so conditional logic could be applied to the char position and allow certain characters according to position, but you'd need to know all the conditions where certain characters would be...
  7. D

    System Resource Exceeded

    G, I was just asking if the BE was Access or SQL server. If the database is split then I'd suggest it's most likely the front end file that must be causing the problem. How many records are involved when these main forms are open? Other things to consider: How many forms do you have running at...
  8. D

    System Resource Exceeded

    Putting the possible memory issue to one side, what's your database setup i.e. is the application split FE/BE, if so what's the BE? David
  9. D

    INSERT INTO date problem?

    If you've nailed the problem to a date issue, then as nam suggests, check all the date fields are indeed date fields. Otherwise I can only suggest taking it apart, start with just a few fields and keep adding more fields until you find the error. David
  10. D

    INSERT INTO date problem?

    Some of your syntax doesn't look quite right, generally follow this ' for string variables '" & strVar & "' OR """ & strVar & """ 'for numbers " & numVar & " OR '" + str(numVar) + "' 'for dates #" & dateVar & "# OR '" + format(dateVar) + "' David
  11. D

    How manipulate data export in rows to become in columns

    Your current format sheet should represent what you would see in a database table and is correct, your required output sheet can be reproduced from a table using a crosstab query by setting the result as The Value, antobiotic would be your Column Value and specimen no, specimen type and source...
  12. D

    Question DNS Question

    I think to deal with this effectively, you'll have to create some sort of access level hierarchy. Do the users have any form of login to this database. Assuming you have for example admin users and standard users, you write something in that will check the access level and if admin user, run a...
  13. D

    Converting Dates into week numbers

    did you manage to sort this only I think I've figured out why datePart works but only partly. It works fine using DatePart("ww", dateChecked, vbSunday, vbFirstJan1) but the problem is, it won't recognise the start of a new year until Jan01 is reached, so the dates from the last Sunday of...
  14. D

    Converting Dates into week numbers

    might need to replace If dateChecked Between yearStart And CDate("31/12/" & Year(dateChecked)) Then: i =52 with If dateChecked >= yearStart And dateChecked <= CDate("31/12/" & Year(dateChecked)) Then: i =52
  15. D

    Converting Dates into week numbers

    yes, you're right I was thinking at the wrong end, you only need to check if DatePart returns 53 Function DatePartCheck(dateChecked as Date) As Integer Dim yearStart as Date Dim yearCheck, i as Integer i = DatePart("ww", dateChecked, vbSunday, vbFirstJan1) If i = 53 Then yearCheck =...
  16. D

    Converting Dates into week numbers

    I'm trying to understand why using DatePart function with constants vbSunday, vbFirstJan1 don't identify week 1 of the respective year, using this the last sunday of December will always be in the week Jan1 of the new year falls. So assuming DatePart for now is correct, you only need to check if...
  17. D

    Converting Dates into week numbers

    can't you use the DatePart function in conjuction with a table of Sunday dates that are the beginning dates of the new year. Use DatePart to return a value (using the constant vbFirstJan1) then compare 1st Jan to the Sunday dates table and make an adjustment to the week number David
  18. D

    Question working with excessive data sets

    Splitting the DB means what it says on the tin, splitting it inot FE/BE, the front-end will look the same as it does at the moment, but the back-end will just consist of your data tables. In this setup you will usually have the BE located on a server which usually uses a back up schedule to...
  19. D

    Question working with excessive data sets

    have you considered splitting the database and having a SQL server back end, this will certianly help with the increase in records and will also improve performance, aid with security and add easy back up functionality If you go down the route of a separate DB for each customer, it could become...
  20. D

    Heading In First or Second Row In Word Doc

    TBH, I havn't tried much vba with Word, but what happens if you try adding the heading text before inserting the table, so the line doc.Range(1, 0).Text = "My Company Name" before doc.Tables.Add Range:=doc.Range, numrows:=1, numcolumns:=5 BTW what is WordSetup, is this a function David
Back
Top Bottom