Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Access Form - datasheet view, which OnEvent

Access Form - datasheet view, which OnEvent

Scheduled Pinned Locked Moved Database
javascriptdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    john john mackey
    wrote on last edited by
    #1

    Hi. I am creating a form that will show results of a query in a "Datasheet View" - multiple records on one form with a header at the top of each column of data. I want to know which event can i use to react to a new record being "loaded"? My desire is to display a different label (text control) only when a field's value (date) changes by record. If I have several records, i want a visual indicator showing change in dates (one label for all Day-1's data, then only one (new) label for all Day-2's data, then only one (new) label for all Day-3's data, ....) Thanks. Johnny J

    D 1 Reply Last reply
    0
    • J john john mackey

      Hi. I am creating a form that will show results of a query in a "Datasheet View" - multiple records on one form with a header at the top of each column of data. I want to know which event can i use to react to a new record being "loaded"? My desire is to display a different label (text control) only when a field's value (date) changes by record. If I have several records, i want a visual indicator showing change in dates (one label for all Day-1's data, then only one (new) label for all Day-2's data, then only one (new) label for all Day-3's data, ....) Thanks. Johnny J

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      From my understanding of Access, you can't have multiple header while displaying data in "Datasheet View", there is only one set of headings at the top of the grid. You can change the background color of cells to give the effect of a "green bar" report making the Day 1 data stand out from the Day 2 data. I believe you want to play around with the Events "Before Render", Before Layout, etc. I've never done it with a datasheet view, but I have created Reports where I would BOLD dates of tasks that were late. The event in the report I believe are "On Print". Good luck. :thumbsup:

      J 1 Reply Last reply
      0
      • D David Mujica

        From my understanding of Access, you can't have multiple header while displaying data in "Datasheet View", there is only one set of headings at the top of the grid. You can change the background color of cells to give the effect of a "green bar" report making the Day 1 data stand out from the Day 2 data. I believe you want to play around with the Events "Before Render", Before Layout, etc. I've never done it with a datasheet view, but I have created Reports where I would BOLD dates of tasks that were late. The event in the report I believe are "On Print". Good luck. :thumbsup:

        J Offline
        J Offline
        john john mackey
        wrote on last edited by
        #3

        Thanks for the advice. I added a text control, separate from the record "set" to which the rest of the form is related. I just shoved the other controls to the right so that I can squeeze my text control to look like it occupies it's own column. My idea was to have my new text control filled with the date, for that group of records with the same date. Only showing that date once. I have my own function that identifies the date for each record and could do something like MyTextCtrl.value = strDateLabel (when I figure out how to react to the right Event.) Thanks again, i will give your ideas a try. JJM

        D 1 Reply Last reply
        0
        • J john john mackey

          Thanks for the advice. I added a text control, separate from the record "set" to which the rest of the form is related. I just shoved the other controls to the right so that I can squeeze my text control to look like it occupies it's own column. My idea was to have my new text control filled with the date, for that group of records with the same date. Only showing that date once. I have my own function that identifies the date for each record and could do something like MyTextCtrl.value = strDateLabel (when I figure out how to react to the right Event.) Thanks again, i will give your ideas a try. JJM

          D Offline
          D Offline
          David Mujica
          wrote on last edited by
          #4

          Ah ha. I think I see what you are doing. How about this ... When you are building your dataset with a query, add a column where you can calculate a value you want displayed. For example: SELECT Payroll.WKNum, IIf([wkNum] Mod 2=0,"Even","Odd") AS OddEven FROM Payroll; This query displays the Payroll Week Number and a Text value of "Even or Odd" This would free the DataSheet View from having to do any logic processing on the dataset, it would just display it. If you need more complex logic, maybe you could extend this by manipulate a temporary table, then display that contents. Give it a shot. :cool:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups