Results 1 to 4 of 4
  1. #1
    CarlV is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    23

    Display Access Query in Web Page

    Okay...okay...I'll stop asking questions after this one....I think!

    With the help of another poster, I was able to get the Query set how it's supposed to be.

    I now have the SQL for that Query and I would like to use that to display the information on a web page.

    I need the information to be constant on the page...if the database is updated, the information that reflects on the page needs to update.

    The database resides on my standalone server, and is opened from that location. (I'm using XAMPP to create a standalone server in a sandbox environment...this is only in house so security isn't a concern.)

    Carl

  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    Try the OutputTo method. Ex.:

    DoCmd.OutputTo acOutputReport, "MyReportName", acFormatHTML, "MyOutputPath/MyFileName.htm"

    Then, of course, you will have to upload the "MyFileName.htm" file to your web host.

  3. #3
    CarlV is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    23
    Thank you for the reply.

    I'm not too familiar with that command or it's properties.

    If I already have a static PHP page, how or where do I incorporate this information?

    This is a live caption of the code that goes to makeup the page I have now. It shows EVERYTHING that is in the "sign_in.customer sign-in" db/table.

    Code:
    <?php
    $db 
    mysql_connect('localhost''root''');
    if (!
    $db) {
        echo 
    'Could not connect to MySQL server. <br />Error # 'mysql_errno(), ' Error msg: 'mysql_error();
        exit;
    }

    // Select the database you want to use – You can use a variable here too instead
    if (!mysql_select_db('sign_in'$db)) {   // Did selection fail?
        // Handle error 
        
    echo 'DB Selection failed. <br />Error # 'mysql_errno(), ' Error msg: 'mysql_error();
        exit;
    }

    // An example for retrieving zero or more rows
    $sql "SELECT * FROM `customer sign-in`";
    $result mysql_query($sql$db);
    if (!
    $result) {
        
    // Handle error 
        
    echo 'Query failed. SQL: '$sql'<br />Error # 'mysql_errno(), ' Error msg: 'mysql_error();
        exit;
    }
    // The while loop stops when there's no data left; it might not even go in loop
    // and echo anything when there's no data returned on the first call to
    // mysql_fetch_assoc()
    echo "<table border='1'>
    <tr>
    <th>Sign In Date</th>
    <th>RANK/CIV</th>
    <th>First Name</th>
    <th>Last Name</th>
    <th>Unit</th>
    <th>DSN/Roshan</th>
    <th>Classifications</th>
    <th>Services Requested</th>
    <th>Service Tag/ Serial Number</th>
    <th>Ticket #</th>
    <th>Make/ Model</th>
    </tr>"
    ;

    while(
    $row mysql_fetch_array($result)) {  // Retrieve data until no more
      
    {
      echo 
    "<tr>";
      echo 
    "<td>" $row['Sign in Date'] . "</td>";
      echo 
    "<td>" $row['Rank/CIV'] . "</td>";
      echo 
    "<td>" $row['First Name'] . "</td>";
      echo 
    "<td>" $row['Last Name'] . "</td>";
      echo 
    "<td>" $row['Unit'] . "</td>";
      echo 
    "<td>" $row['DSN/Roshan'] . "</td>";
      echo 
    "<td>" $row['Classifications'] . "</td>";
      echo 
    "<td>" $row['Services Requested'] . "</td>";
      echo 
    "<td>" $row['Service Tag/ Serial Number'] . "</td>";
      echo 
    "<td>" $row['Ticket #'] . "</td>";
      echo 
    "<td>" $row['Make/ Model'] . "</td>";
      echo 
    "</tr>";
      }
    }
    ?>

  4. #4
    CarlV is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Posts
    23
    I also wanted to add that I took the Query in Access and made it a Report in Access. The Report name is "CheckedInEquipment".

    I need it so when the end user opens the web page to view the "CheckedInEquipment" list it has the most current data that is in the Access DB.

    I'm really hoping someone has done this and can provide some help....I'm at a loss.

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

Similar Threads

  1. Display Web Page in a MS Access Form/Field
    By webinteractive in forum Forms
    Replies: 3
    Last Post: 04-01-2011, 03:53 PM
  2. Replies: 5
    Last Post: 10-19-2010, 08:02 AM
  3. Page break on report inserts empty page between
    By Galadrielle in forum Reports
    Replies: 0
    Last Post: 07-07-2010, 04:18 AM
  4. report does not display in 1 page
    By ngeng4 in forum Reports
    Replies: 4
    Last Post: 03-18-2010, 08:26 AM
  5. Access Programming and Access Data Page
    By frmdread67 in forum Programming
    Replies: 0
    Last Post: 03-19-2008, 03:11 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