Recent content by AccessBeginner

  1. A

    Autonumber just isn't doing it - I need to do things a little differently...

    SORTED !!! Simply made my ContactID field into a standard number field, instead of an autonumber field Then I put an 'after update' onto the RefNo field (allowing the user to manually amend it etc) Once they do this, it takes the 'numeric' portion of the RefNo field, and puts it into the...
  2. A

    Autonumber just isn't doing it - I need to do things a little differently...

    Yep, I think that is the problem. I had it tied to the Autonumber initially, but now need to tie it to the RefNo instead. So, has anyone any idea what string expression I would need to put into my code above to take the 'number' portion of my RefNo (ie everything after the final /) and...
  3. A

    Autonumber just isn't doing it - I need to do things a little differently...

    And one final problem - if I trim 3 digits, the number may be longer once the cases hit 1000.... so I would need to trim everything after the final /
  4. A

    Autonumber just isn't doing it - I need to do things a little differently...

    Was actually thinking, I could in theory amend the code (the Full Name Exit Code) so that it works the refno out based upon the previous refno - and trims the 3 digits from there all in the above piece of code, rather than creating a table column to hold this number. Maybe that will be a little...
  5. A

    Autonumber just isn't doing it - I need to do things a little differently...

    ok, I have a database which has a table called Constituents There is a primary key called ContactID which is a simple Autonumber I make a reference number (RefNo) from this which is given to each Constituents Manual Case Folder. The reference number takes the format.... AR/10/C/585 Where...
  6. A

    Thanks Mike for your help, it was much appreciated. I was pulling my hair out tonight on this...

    Thanks Mike for your help, it was much appreciated. I was pulling my hair out tonight on this one :) Some things seem so simple, but when it is outside my own comfort zone, it gets a little frustrating.
  7. A

    Using AutoNumber to get part of a Reference Field

    Cheers mike, you are a star. I just used the code as I listed previously, in an 'after update' on the name field. It seems to work ok, and keeps the data after i close the form ok, so no probs there. This is very useful actually, and is as hard a piece of coding as this miserable little...
  8. A

    Using AutoNumber to get part of a Reference Field

    That's what I removed, after a little trial and error, and as my post above, it worked fine :) Cheers for the help Mike, I really appreciate it.
  9. A

    Using AutoNumber to get part of a Reference Field

    ok, I got it working by changing the code...... I put the following into an 'After Update' on the Clients Name field, which will suit perfectly well.... Private Sub FullName_AfterUpdate() If Me.NewRecord Then On Error Resume Next Me![ClientID] = Nz(DMax("[ClientID]", "Clients"), 0) +...
  10. A

    Using AutoNumber to get part of a Reference Field

    If Me.NewRecord Then On Error Resume Next Me!ClientID.DefaultValue = Nz(DMax("[ClientID]", "Clients"), 0) + 1 Me!RefNo.DefaultValue = ("BB/" & (Right(Year(Date), 2)) & "/C/" & [ClientID]) End If The above is the exact code I am using with regards to this, and no matter where I...
  11. A

    Using AutoNumber to get part of a Reference Field

    ok, I put the code into my form, and nothing happens, either to the numberical ClientID field, or the RefNo field Private Sub Form_Current() If Me.NewRecord Then On Error Resume Next Me!ClientID.DefaultValue = Nz(DMax("[ClientID]", "Clients"), 0) + 1 Me!RefNo.DefaultValue = ("BB/"...
  12. A

    Using AutoNumber to get part of a Reference Field

    That is great Mike, thanks very much for your help. I'll try this later tonight, when I get the table structure etc put together. This will make the whole task much easier, and I'll drop the 'Autonumber' fields altogether as per the original replies. Super service guys, and thanks for your...
  13. A

    Transfers to new HDD

    You could use a piece of software like Acronis True Image or the likes. Use Acronis to take an image of your old HDD, then copy this to your new HDD, and it will handle the resizing etc too. Acronis is about £29 or so iirc. Another product they have is 'Acronis Migrate Easy', designed...
  14. A

    Using AutoNumber to get part of a Reference Field

    ok, so if I am correct then.... I'll put the following into my #On Current' part of my form..... (Note Form & Table = "Cases", Field = "CaseID", File Ref Field = "RefNo") Private Sub Form_Current() If Me.NewRecord Then On Error Resume Next Me!CaseID.DefaultValue = Nz(DMax("[CaseID]"...
  15. A

    Using AutoNumber to get part of a Reference Field

    That's definitely useful, though my code experience is pretty dire tbh. I simply replace my own field/table names into the 'On current' code and that should sort me? So, taking this to the next step, I could then also put a value into my actualy 'file reference' field on the same piece of...
Top Bottom