Modules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glamster7
    New Member
    • May 2007
    • 33

    Modules

    Am looking to create a module or make this part of my ShowDetails module (Code posted in another thread) If it needs reposting let me know.

    What I need is to create a module of some code in a module that looks at the Booking_Appoint _Duration in the bookings table & then fills the correct number of appointment slots with the show details data in the view bookings sub form.

    E.g

    If Booking_Apoint_ Duration is 30mins it will fill one appoint slot with booking data
    If Booking_Appoint _Duration is 45 -1hr it will fill two appoint slots with booking data
    and so on

    Any clues or sample code on how I might accomplish this. thanks in advance
  • glamster7
    New Member
    • May 2007
    • 33

    #2
    just bumping this as i'd like to solve this soon

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      Originally posted by glamster7
      Am looking to create a module or make this part of my ShowDetails module (Code posted in another thread) If it needs reposting let me know.

      What I need is to create a module of some code in a module that looks at the Booking_Appoint _Duration in the bookings table & then fills the correct number of appointment slots with the show details data in the view bookings sub form.

      E.g

      If Booking_Apoint_ Duration is 30mins it will fill one appoint slot with booking data
      If Booking_Appoint _Duration is 45 -1hr it will fill two appoint slots with booking data
      and so on

      Any clues or sample code on how I might accomplish this. thanks in advance
      You'll need some recordset processing code like:
      [code]
      dim rs as DAO.Recordset
      dim lngDuration as Long

      set rs = currentdb.openr ecordset("tblAp pointment")

      lngDuration = Booking_Appoint _Duration
      while lngDuration > 0
      rs.addnew
      rs!AppointID = Me.AppointID
      rs.update
      lngDuration = lngDuration - 30
      wend

      Getting the idea ?

      Nic;o)

      Comment

      Working...