Search results

  1. K

    Split data from column

    OK, in code there's a great little function called Split which returns an array (so it can't be used in queries as far as I'm aware). This will split your string into multiple strings, eg: Dim rs as Recordset, x As Variant, ctr As Byte Set rs = [your table] rs.MoveFirst Do Until rs.EOF x =...
  2. K

    MOD36 check digit

    OK, first off make sure you've put the function in a new module. Use this one as I've adjusted it slightly: Public Function Mod36(Num As Single) As String Dim R As Byte R = Abs(Int(Num)) Mod 36 If R <= 9 Then Mod36 = Trim(Str(R)) Else Mod36 = Chr(R +...
  3. K

    Split data from column

    FirstName1: Trim(Iif(InStr(FirstName," & ")<>0, Left(FirstName,InStr(FirstName," & ")),FirstName)) ... Do you need to do this as an update query, or can you use code instead?
  4. K

    Split data from column

    First I'd highly recommend bringing all your data into the same format, so you don't have both commas and ampersands to worry about. To do this, I suggest you run an update query on your existing data: UPDATE Table1 SET Table1.Field1 = Replace([Field1],","," &"); This will replace any commas...
  5. K

    MOD36 check digit

    It's always difficult to judge people's knowledge of Access, so I didn't want to go into too much detail of things you might already know. It also depends which version of Access you're using. In Access 2003 or earlier, go onto Modules and click New. I can't remember in Access 2007 where you...
  6. K

    MOD36 check digit

    I don't know if there's a built in way to do this, but I can write you code to stick in a module: Public Function Mod36(Num As Integer) As String Dim R As Byte R = Abs(Num) Mod 36 If R <= 9 Then Mod36 = Trim(Str(R)) Else Mod36 = Chr(R + 55) End If...
  7. K

    Changing the column order in the datasheet part of a split form (Access 2007)

    I've now discovered you can also move the columns around in Layout view, which is handy.
  8. K

    Changing the column order in the datasheet part of a split form (Access 2007)

    Thank you kvar! That works perfectly. It now seems so obvious, but I was thinking along commpletely the wrong lines so I'd never have got there on my own. :-)
  9. K

    Changing the column order in the datasheet part of a split form (Access 2007)

    SOLVED: Changing the column order in the datasheet part of a split form (Access 2007) Hi guys, I've been getting to grips with Access 2007 recently and have run up against a problem with split forms. I have a split form with >30 fields. The fields/columns in the datasheet are not in an...
  10. K

    Ignore the letter P?

    It depends exactly how your code is working at the moment, but the principle looks something like this: Dim BC As String BC = [your barcode in full] If Left(BC,1) = "P" Then BC = Mid(BC,2) [your field] = BC
  11. K

    Word Documents no longer open from access form

    I've had issues before with the line: Dim appWord As Word.Application Instead try: Dim appWord as Object Set appWord = CreateObject("Word.Application") ...also remove your existing Set appWord line. Leave the rest of your code as it is and see if it now runs. Dim-ing applications seems...
  12. K

    VBA Help in MS Access 2003

    Your welcome, glad it works!
  13. K

    VBA Help in MS Access 2003

    OK, so clearly for your case the code goes on the OnClick of the Logon button (rather than the After Update that I previously stated), and after you check the password. I'm guessing that the problem comes if you haven't entered a form name against a person, so possibly you need a check for a...
  14. K

    VBA Help in MS Access 2003

    It sounds like you need an extra field in your combo - assuming your logon data is stored in a table then you'll need to add a text field to that table and then add it into the combo. Don't forget to add one to the Column Count and to add an extra Column Width of zero. The extra field will...
  15. K

    VBA code to maniplate web browser fails

    OK, I finally got it working! It's to do with the security settings of IE. I tried to manually navigate the IE window to the site so I could test the rest of my code and I got a message about the site being in a different zone and so it had to be opened in a different window. Apparantly the...
  16. K

    VBA code to maniplate web browser fails

    Thanks Cameron. I did look at some of the IE Tools/Internet Options settings, maybe just haven't hit on the right one yet. Incidentally, my IE version is 7.0.6002.18005. Nice to know I was thinking along the right lines anyway, I'll keep fiddling!
  17. K

    VBA code to maniplate web browser fails

    Well, the concatenation of the URL is defintely going through right. Not only does it debug correctly, the webpage does open correctly too, just not in the right window. Any other thoughts?
  18. K

    VBA code to maniplate web browser fails

    Thanks for the suggestions. I don't have time now to try the debug, I'll do it tomorrow and let you know how it goes. As for the other points... I left the brackets in the navigate line by mistake after trying something else that didn't work, they weren't in my original code and have been...
  19. K

    VBA code to maniplate web browser fails

    SOLVED: VBA code to maniplate web browser fails I have some code which worked fine on one computer (Vista, Excel 2007 (in compatibility mode), IE8) but which falls apart on my main computer (Vista, Excel 2003, IE7). The code is: Sub MySub(Usr As String) Dim ie As Object Set ie =...
  20. K

    How to hide a field(s) selectively based on a field from the same report?

    Your link is to something in your docuemnts on your computer, so we can't see what that solution was. In access 2003 I'd use the form's OnCurrent event and the places where the first control is hidden or un-hidden and use something like: Me!Field1.Visible = Me!Field2.Visible This means...
Back
Top Bottom