Results 1 to 5 of 5
  1. #1
    simon123 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    12

    Unbound text box with Consecutive value

    Hi there,

    I have a subform which displays information for events. The duration of our events vary, so you could have a 1 day event or a 3 day event over 3 different dates... and so on. I have created a form displaying the event details and in the subform, I can add the date and times of each day. What I would love, is to be able to have a label for each date, just showing "Day 1, Day 2... " etc.

    Currently I placed the following in a text box, and it looked like it would work initially - but it doesn't and as I add days, the value in the text box goes all over the place

    Code:
    =IIf([Programme Date]<>"","Day " & [Form].[CurrentRecord],"")
    Is there a straightforward way of doing this?

    Pic below for visual reference. Many thanks for any help



    Click image for larger version. 

Name:	accesshelp.PNG 
Views:	21 
Size:	9.7 KB 
ID:	34293


  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    You can do that with a ranking query (see https://bytes.com/topic/access/insig...-ms-access-sql or google it for other examples) or better yet do it on a report using the runningsum property (see https://msdn.microsoft.com/en-us/vba...roperty-access).

    Cheers,
    Vlad

  3. #3
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    T
    here is no straightforward way of doing this. Auto-Sequential numbering is very complicated in tables/forms.

    The straightforward thing is to enter that value (offer a combobox selector to make easiest) into a bound field. i.e. the users have to number their days themselves.... anything else is a real chore.....

  4. #4
    simon123 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    12
    Thanks very much for your input both of you. I think i will redesign the form without it but create a report with the runningsum function.

    Cheers

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Sounds great, good luck with your project!

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

Similar Threads

  1. Using SQL with an unbound Text Box
    By Max2413 in forum Programming
    Replies: 5
    Last Post: 06-15-2016, 11:54 AM
  2. Replies: 13
    Last Post: 09-16-2014, 01:55 PM
  3. Information text on unbound text box
    By randle in forum Forms
    Replies: 3
    Last Post: 06-28-2013, 11:43 AM
  4. Replies: 2
    Last Post: 06-11-2012, 09:37 AM
  5. Unbound text box truncating text
    By gddrew in forum Forms
    Replies: 0
    Last Post: 03-02-2006, 11:26 AM

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