Results 1 to 9 of 9
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    Php files

    I am new to this forum and in need of answers. At risk of sounding like a dummy. How am I suppose to extract the codes from php file and insert the code in to access. I have notepad ++ and Komodo but when I open the file all I get is a bunch of "NUL's"

    Thank-you

    Cheeco

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Where are you trying to put the code in Access? Access and PHP are apples and oranges. The only place you could put it is in a text or memo field in a table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    php file

    attachment.zip I am just learning access. I have this file (I have attached the file). When unzipped it is a php file. I want to learn how to use these files in access.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'm sorry, the file for me is all jumbled up, and I don't know how to import it into Access.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    pbaldy. force open file with access. The extension is incorrect but the file contents are there. Access should recognize the file. Im not too sure how the attached file is relavent at all. but these were my findings.

    code i found, operates a clock.
    Code:
    
    
    
    Private Sub Detail_Click()
    
    
    End Sub
    
    
    Private Sub Form_Close()
    DoCmd.RunCommand acCmdExit
    End Sub
    
    
    Private Sub Form_Load()
    DoCmd.MoveSize , 2500
    Me.TimerInterval = 1
    start = 1
    End Sub
    
    
    Private Sub Form_Timer()
    
    
    
    
    
    
    Dim hv As Integer
    Dim adh As Integer
    
    
    Me.DClock = Time
    Me.Ahours = Format(Time, "hh")
    Me.Amin = Format(Time, "nn")
    Me.Asec = Format(Time, "ss")
    
    
    If Me.Amin >= 12 And Me.Amin <= 23 Then
    adh = 1
    ElseIf Me.Amin >= 24 And Me.Amin <= 35 Then
    adh = 2
    ElseIf Me.Amin >= 36 And Me.Amin <= 47 Then
    adh = 3
    ElseIf Me.Amin >= 48 And Me.Amin <= 59 Then
    adh = 4
    End If
    
    
    
    
    hv = IIf(Me.Ahours = 12, 0, IIf(Me.Ahours > 12, Me.Ahours - 12, Me.Ahours)) * 5 + adh
    
    
    Dim ctrl2 As Control
    For Each ctrl2 In Controls
    
    
    If Left(ctrl2.Name, 1) = "h" Then
    
    
    If Right(ctrl2.Name, 2) = hv Then
    Me(ctrl2.Name).Visible = True
    Else
    Me(ctrl2.Name).Visible = False
    End If
    
    
    End If
    
    
    Next
    
    
    
    
    
    
    
    
    Dim ctrl As Control
    For Each ctrl In Controls
    If Left(ctrl.Name, 1) = "s" Then
    
    
    If Right(ctrl.Name, 2) = Me.Asec Then
    Me(ctrl.Name).Visible = True
    Else
    Me(ctrl.Name).Visible = False
    End If
    
    
    End If
    
    
    Next
    
    
    
    
    Dim ctrl3 As Control
    For Each ctrl3 In Controls
    If Left(ctrl3.Name, 1) = "m" Then
    
    
    If Right(ctrl3.Name, 2) = Me.Amin Then
    Me(ctrl3.Name).Visible = True
    Else
    Me(ctrl3.Name).Visible = False
    End If
    
    
    End If
    
    
    Next
    
    
    
    
    If start = 1 Then
    Me.Clock.SetFocus
    start = 2
    End If
    
    
    
    
    End Sub

  6. #6
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I followed Perceptus's lead and opened the file using Access. I then saved it as a accdb (attached zip file). The form displays a clock.
    Attached Files Attached Files

  7. #7
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    Sounds like the OP is using IE - I've had the same problems with .accdb/.mdb files being downloaded as .php. As ssanfu says, right click and open with Access or change the file extension to .accdb/.mdb depending on the filetype downloaded

  8. #8
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    Thanks for all the great help. I will do that from now on. It seems that many of the files are php files. I am guessing but it maybe the file is smaller in that format.

    Thanks

    Cheeco

  9. #9
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    one other tip when uploading a db - zip it first - then the file type is protected and responders can just open the zip file, then the db

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

Similar Threads

  1. using mdb files which are backed up hourly into zip files
    By Robbie MacKinnon in forum Access
    Replies: 3
    Last Post: 05-05-2015, 05:02 AM
  2. Zip files
    By joanas in forum Programming
    Replies: 3
    Last Post: 05-05-2015, 03:27 AM
  3. Replies: 4
    Last Post: 05-15-2014, 12:49 PM
  4. PDF OLE files
    By sam1 in forum Access
    Replies: 0
    Last Post: 11-24-2011, 07:26 AM
  5. Replies: 1
    Last Post: 02-21-2011, 09:55 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