Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    Increment number field on button press.

    This is try and find a solution posted here:



    https://www.accessforums.net/showthread.php?t=58596

    Basically the form I'm using will be for one job. It will have the control "Job_ID" on that same form. A button will create the appointment for that job when pressed.

    I will make a new field on the "JobT" table named "number_of_visits" or something like that. Then every time I make an appointment I want that to increment by one.

    Hoping someone can give me some direction on how to do this as I haven't been able to find a solution. (using a query is preferable as I'm not good with VBA, although I can with some help.)

    Thanks in advance.

    Edit: some additional info, I can see how this would work with an expression but then how would I get an expression to run in the existing VBA? I don't have it working yet at all but I can see how it would.

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Nailed it....

  3. #3
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    Nice, but help us all learn and tell us how?

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Its just a simple expresion. The guides i found were using the expression builder and I didnt know how to get to it. I didnt fully understand what it was either to be honet.

    Basically the field in the query is like :

    Code:
    expression name: [tbl1].[field1] & " " & [tb12].[field2]
    very simple, but it will provide me with a subject name that will be unique. When its created +1 is added to a counter so the subject in outlook is like [name] & " " & [project] & "Visit " [counter]

    then i can do a search for each created appointment in the calendar as these are appended to an apointments table. I can manage all appointments in access now. Also every changed is logged.

    Once its all working as it should it will save atleast a days work every week. Its causing me some stress right now bugfixing though haha. I fix one thing and something else breaks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 23
    Last Post: 04-18-2013, 09:31 PM
  2. Replies: 3
    Last Post: 06-21-2012, 05:25 PM
  3. Replies: 0
    Last Post: 07-05-2011, 10:24 PM
  4. Replies: 5
    Last Post: 11-12-2010, 12:10 PM
  5. How to Increment A Number Field
    By Advanced in forum Programming
    Replies: 3
    Last Post: 01-27-2010, 02:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums