Results 1 to 3 of 3

Thread: Help

  1. #1
    Join Date
    Aug 2011
    Posts
    12

    Unanswered: Help

    Hi there i have created a database to store player game info.

    I have also created a report to produce a player averages report and it places them in the order of highest points to lowest, however what i want to do is add a pos field to that report to show 1st 2nd third ect.

    Could some one show me an example of a table that does this all give me step by step instructions.

    my second problem is I want to create a button to open a report, i want the whole report to open but want the button to select and highlight a specific field like player name based on the player details that are shown on player stats form

    I e player stats form shows player name and the match data results when i click on the button it will then open a report called win% showing all the players win percentage details but highlighting the players name that has already been selected.

    Im a beginer user with access and no some advanced features but this is what im struggling on at the moment any exmaple database that people have created please attach to see if i can canoblize them.

    jonesstanwellatskydotcom

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what you could do in you report is create a control and populate the data yourself through VBA

    so:
    open your report in design mode
    add a textbox control where you want it, wide enough for the number of positions, give it a meaningfullname eg tbRanking.
    view the code in 2010 select the "view code" option on the design tab
    below 'option compare database' add
    Code:
    option explicit
    Dim intRanking as integer
    ...option explicit forces tighter variable checking
    intRanking is a varaible avaialble to all parts of the report
    select the report option in the LHS combo of the code window
    int he report_open sub type
    Code:
    intRanking = 0
    this intialises the ranking variable

    the select detail in the LHS combo box in the code window and we need to assign the value of the intranking variable to the control
    in detail_format type
    Code:
    intRanking = intRanking +1
    tbRanking.value = intRanking
    just for safety compile the code in the code window DEBUG | COMPILE, check for errors, clear any errors that exist (either comment out or fix)
    close the code window and run the report
    close the code window
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2011
    Posts
    12

    Help Continued

    Hi there i have created a database to store player game info.

    I have also created a report to produce a player averages report and it places them in the order of highest points to lowest, however what i want to do is add a pos field to that report to show 1st 2nd third ect.

    Could some one show me an example of a table that does this all give me step by step instructions.

    my second problem is I want to create a button to open a report, i want the whole report to open but want the button to select and highlight a specific field like player name based on the player details that are shown on player stats form

    I e player stats form shows player name and the match data results when i click on the button it will then open a report called win% showing all the players win percentage details but highlighting the players name that has already been selected.

    Im a beginer user with access and no some advanced features but this is what im struggling on at the moment any exmaple database that people have created please attach to see if i can canoblize them.

    Or is there a much easier way to do this by adding a position field via player table and locking that field so it cant be sortedplease issue step by step in laymens terms

    jonesstanwellatskydotcom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •