Search results

  1. A

    populate word template from a continuous form

    Unfortunately yes, it has to be a word doc. Currently the code I wrote in post #1 works fine for fields from single form, but when it comes to fields from continuous form, I only can get the first record. Probably I should learn some Word VBA!
  2. A

    populate word template from a continuous form

    Well actually, I'm having the same idea in mind but It's not about the idea, it's about the syntax. How can I position the next record to be in a new line or a new row assuming that I'm populating a table in word.
  3. A

    Highlight last selected record

    That's okay vdanelia :D I mean the main form record that lost its focus, after moving from it to its related subform record. Could this be done?
  4. A

    populate word template from a continuous form

    Is there anyway to populate a word template from a continuous form? Currently, only one record from the continuous form appears in the word template, which is the the record that has the focus. I'm using this code .ActiveDocument.Bookmarks("BookmarkOne").Select .Selection.Text...
  5. A

    Highlight last selected record

    I have a main continuous form, with a continuous subform in its footer. Is there anyway to hightlight the last selected record in the main form when the subform gets the focus?
  6. A

    Auto incrementing letter part of an alphanumeric key

    The year comes from the function parameter, I've amended it and it works perfectly! Finally, it's done! :D Thank you, vbaInet!
  7. A

    Auto incrementing letter part of an alphanumeric key

    Lol, That's "Programming world", I have to get used to it. :o Now I'm trying to make use of that effective one line of code to generate the key in it's final format.
  8. A

    Auto incrementing letter part of an alphanumeric key

    Well, honestly I'm trying to place it somewhere in my function, I don't know if it's going to work in the VBA editor though.
  9. A

    Auto incrementing letter part of an alphanumeric key

    I already set the format of the [letter] field to '>' to get it in upper case
  10. A

    Auto incrementing letter part of an alphanumeric key

    the number 64 appears
  11. A

    Auto incrementing letter part of an alphanumeric key

    It works, the content of the [letter] field appears
  12. A

    Auto incrementing letter part of an alphanumeric key

    It gives me the same error again
  13. A

    Auto incrementing letter part of an alphanumeric key

    That's very promising! I can't wait to break the back of it, although it gives me an #Error when I test it. What could probably cause such an error?
  14. A

    Auto incrementing letter part of an alphanumeric key

    Probably UCase(Chr(Asc(Nz(DMax("Letter", "T_M_AutoClaimNo", "GroupType = 'GC'"), 96)) + 1)) You can find my full function in post #1 here's it anyway Function NewClaimNo(pValue As String, noofClms As Integer, year As Integer) As String Dim db As Database Dim LSQL...
  15. A

    Auto incrementing letter part of an alphanumeric key

    Alright, I've added a where clause to the code Ucase(Chr(Asc(Nz(DMax("Letter)", "T_M_AutoClaimNo"), 96)) + 1)) where GroupType = "GC" Now, in case the code above is correct, where should I place it? Default property of a which textbox? And if it could goes anywhere in the VBA editor where...
  16. A

    Auto incrementing letter part of an alphanumeric key

    I know that DMax() returns the maximum value in a set of records, but in my case I only have one record in my table
  17. A

    Auto incrementing letter part of an alphanumeric key

    Well, maybe I should have given more details, mentioning that I already have a function named "CreateClaimNo" that will insert the created key by the "NewClaimNo" function into a table named 'T_M_Claims'- Which is in the same time a subform in my main form. My main form has a one to many...
  18. A

    Auto incrementing letter part of an alphanumeric key

    Galaxiom, You're right, this could not be ideal, that's why I tried to avoid it by developing constraints to control the user's input and it worked somehow. Thanks for bringing the reserved words issue to my attention. I'll work on the redundant elements issue once I get the increment problem...
  19. A

    Auto incrementing letter part of an alphanumeric key

    Is it possible to use the code you provided to update my table (In SQL)? because from what i've noticed, the problem is actually in the statement below LUpdate = LUpdate & " set Letter = " & Lrs(Chr(Asc("Letter") + 1)) Where I have to replace the statement in red with a code that would...
Back
Top Bottom