Search results

  1. K

    Reset field value

    Thanks Brian but still the same error. I have another idea, is it possible to customise the Record Navigation buttons in a Form? I know this is possible in a Data Access Page, but I can't find anything about it on Forms. Just saw The Record Navigation bar does exactly what I want to do. Now...
  2. K

    Reset field value

    Oh yeah and I tried your suggestion, but I still get the same error. Maybe I approach this in the wrong way: If the user goes to the next record, I want an incrementing counter on the subform to reset back to 0, so that I can count from 1 again. ie. Main Form record = 1 Sub Form: Counter is...
  3. K

    Reset field value

    Referring problem Brian I'm having problems referring to the value in the subform. Even though I'm using the Expression builder to select the control I want changed, I still get an error saying: Microsoft Office Access cannot find the form name 'SubFormCalls' referred to in a macro epression...
  4. K

    Reset field value

    Hi all I've searched the forum but couldn't find anything helpful. I have a Main Form, with a Sub Form on it. They are linked with the field RefNumber, which is an Autonumber field counting the amount of records. What I want to happen is: As soon as the RefNumber changes, I want a field on the...
  5. K

    Resetting value in Subform as soon as a record is added on Main Form

    Hi guys Couldn't find anything like this in the forums. I think the title explains it really. As soon as I add a new record on the Main Form, I want to reset a number field on the subform back to 0. I tried using a macro and the NewRecord method in VBA, but I couldn't get it to work. I thought...
  6. K

    Subform problemo

    Hi guys My main form is linked with my subform via RefNumber. I want to change the value of a field, Counter, in my subform, as soon as the RefNumber (found in both forms) changes. RefNumber is an Autonumber. RefNumber is basically the amount of records, so I played with the idea of using the...
  7. K

    Autonumber problems.

    This is what I came up with Private Sub Form_Current() If Me.NewRecord Then If Me.RefNumberDistrict = "DPR" Then Me!RefDPR.Value = Nz(DMax("[RefDPR]", "Combined_tbl"), 0) + 1 End If If Me.RefNumberDistrict = "DPZ" Then Me!RefDPZ.Value = Nz(DMax("[RefDPZ]"...
  8. K

    Autonumber problems.

    Pat But I think I do need the number of records, that's why I used DCount in stead of DMax. My reasoning: I want to know the number of times say DFE is picked, so if DFE has been picked 2 times, and we are at record 6 and DFE gets picked again, it's 2+1=3. But the thing is, if the answer...
  9. K

    Autonumber problems.

    neileg I used DCount to count the number of times say, "DPR" has been selected, but now I get the total amount of times DPR has been used. ie. RefNumber is at 14 DPR has been selected 7 times. Now even though RefNumber nr. 5 is the second time DPR has been selected, it displays the total number...
  10. K

    Autonumber problems.

    RCurtin Thanks for the reply. But you don't understand completely, if you choose a new District, the Refnumber should reset!! That's what my problem is. And I don't know how to do it. And the result of the new field - I want to store it in a table for later reference.
  11. K

    Autonumber problems.

    Hi guys I've had trouble with this for quite a while now. Can someone please help me? I have 1 autonumber, Refnumber, which is sequential and it's my primary key. I then have a Combo box selection field, RefDistrict. This is a string field, with the selections being: DFE; DPZ; DAB; DGG; DAS...
  12. K

    Autonumber Problem

    Hi Wayne Thanks for the help. I can't quite get it to work, can you please use the variables I gave you?, I'm quite the simpleton when it comes to this... I guess this is what you get when you are self taught. If I understand correctly, MyNewNumber is a new number I should create, Autonumber...
  13. K

    Autonumber Problem

    Hi guys I searched for my answer but then realised I don't really know what I am looking for. I have a (what I think is a basic) problem, about autonumbers. I have a table, CallsToCustomer_tbl. In this table I have 2 fields, RefNumber (which links to the main table, and in the main table...
  14. K

    Reference Number

    OK here is what I have to do: The user chooses from a combo box one of the following: DPR, DPZ, DFE, DGL, DMI, DGJ or DPE. RefNumber is a Autonumber field counting the amount of records. So if we are at record number 1, the user chooses DFE, I want a field saying DFE001. Say the second...
  15. K

    Reference Number

    FoFa Thanks for the help. It works perfectly. But now I'm having trouble adding the 1. The DCOUNT counts the current amount of choices, but how do I add the 1 more? Am I able to re-run the query? Thanks again.
  16. K

    Reference Number

    Hi guys/gals My primary key, RefNumber, is a sequentual Autonumber field. I want to creat my own Custommade autonumber field, but the catch is: My autonumber field should have any of the following (selectable by the user from a combo box from a Form) attached in front of the number...
  17. K

    Difficult If-statement

    raskew Yeah thanks did it did exactly what I wanted. Cheers
  18. K

    Difficult If-statement

    Whoops sorry did a search and got my answer.
  19. K

    Difficult If-statement

    Thanks guys. Is there a trunc function in Access? Trunc is where you throw away the numericals after the comma. eg: Trunc(2.9)=2 and Trunc(3.1)=3 and Trunc(1233.5)=1233
  20. K

    Difficult If-statement

    I have a solution for my problem, I just want to see if there is an easier way. Here is my predicement: From...........To..............c 0...............100............5 100............500............10 500...........1000...........15 1000.........3000............25...
Back
Top Bottom