User Profile

Collapse

Profile Sidebar

Collapse
tehgreatmg
tehgreatmg
Last Activity: Jun 26 '07, 01:40 PM
Joined: Jan 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tehgreatmg
    started a topic Need help with a counter

    Need help with a counter

    What I have is this php code saved as a .php file
    Code:
    <?php
    $count_my_page = ("hitcounter.txt");
    $hits = file($count_my_page);
    $hits[0] ++;
    $fp = fopen($count_my_page , "w");
    fputs($fp , "$hits[0]");
    fclose($fp);
    ?>
    And this in my html code

    Code:
    <?php
    include ("counter.php");
    ?>
    I have never...
    See more | Go to post

  • tehgreatmg
    replied to Hit counter:New to Webpage
    Nevermind, I figured it out.
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    started a topic Hit counter:New to Webpage

    Hit counter:New to Webpage

    HI all,

    I have never done any webpage stuff before and was just given an assignment to make a hit counter for my companies intranet page that is invisible and stores the value somewhere. Any help would be highly appreciated, thanks!!
    See more | Go to post

  • tehgreatmg
    started a topic How to link data in two tables

    How to link data in two tables

    I have completely forgotten how to do this. I have two tables, we will call them table 1 and table 2.
    Table 1 has the fields

    ID
    Model
    Brand
    NumberOnHand
    DateOrdered

    Table 2 has the fields

    ID
    Model
    Jan
    feb
    (and so on)


    The data in the ID and Model fields of both tables should be corresponding. The Model field in table...
    See more | Go to post

  • tehgreatmg
    replied to Convert a date to a text string
    The only thing I can think of to do is to break the date up to seperate dd mm yyyy. Then make a statement to compare the mm and set it to your mmm format and then just recombine everything for an output. This is probably the longest way around, I have only been using vb for about 1 yr now so I dont know many shortcuts, hope this helps.
    See more | Go to post

    Leave a comment:


  • What you going to want to do is put your code in the change or after update event of the combo box. First you will need an IF statement to see if daily, weekly or monthly is selected. Then another IF statement within that one to compare the sell and buy cost to see if it is a profit or loss. Do the calculation and have your data output.

    Hope this helps you, I prefer giving a general idea to help people play with code and learn....
    See more | Go to post

    Leave a comment:


  • Renumbering two fields in different tables at once

    Ok I have two tables both with an ID field, whenever a record is deleted these need to be renumbered to keep corresponding data. Here is the code I am using to do this:
    Code:
        Dim db As DAO.Database
        Dim rs2 As DAO.Recordset
        Dim rs3 As DAO.Recordset
    
        Set db = CurrentDb()
        Set rs2 = db.OpenRecordset("PrinterCartInventory")
        Set rs3 = db.OpenRecordset("CartUse")
    ...
    See more | Go to post

  • Thanks Nico that is all I needed.
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    replied to Using a variable to identify a field.
    Alright I moved it here: Using a Do Until Loop to search for and modify data in a table And also I will probably change that case statement to the code you gave me after I get it writing data and working better first.
    See more | Go to post

    Leave a comment:


  • Using a Do Until Loop to search for and modify data in a table

    Here is my code:
    Code:
        Dim db As DAO.Database
        Dim rs1 As DAO.Recordset
    
        Set db = CurrentDb()
        Set rs1 = db.OpenRecordset("CartUse")
        rs1.MoveFirst
      
        Do Until rs1.EOF
            If rs1.Fields(ID) = Val(ID) Then
                NumOrdTotal = Val(rs1.Fields(varLongMonth)) + Val(varNumOrd)
                txttest2 = Val(NumOrdTotal)
    ...
    See more | Go to post

  • tehgreatmg
    replied to Using a variable to identify a field.
    Thanks NeoPa that did the trick, but now I got another probelm, WOOHOO. I can not get it to enter data into other records, just the first record. It is not giving any errors it runs it like its working. So its just some little thing.

    Updated Code:
    Code:
        Select Case varMonth
            Case Is = 1
                varLongMonth = "January"
            Case Is = 2
                varLongMonth = "Feburary"
    ...
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    replied to Access/VB
    I believe it will be one of those two, I am not sure since I dont know where your data is coming from. BUt it should be something like this.

    Code:
    "TableName".DisplayAlerts = false
    "QueryName".DisplayAlerts=false
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    replied to Update Query Help
    I am not quite sure on this but this may help you get started:

    Code:
    UPDATE tblCopyTo
               Set "FieldName of where you want the data to go" = [tblCopyFrom]!["FiledName fo where you are getting the data from"]
               Where "Foriegn Key Field" = [tblCopyFrom]!["Primary Key Field]
    Where I have the quotes around things that is just to represent fields, you do not need the quotes....
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    replied to I Need Help With An If Statement
    I can give you a start on this, I don't have my reference materials with me so the syntax wont be exactly right but you will get a general idea of what needs to happen.

    First you need to place the data from the text box into a variable container.

    Code:
    Dim varAmount as Integer
    varAmount=Val(EMP_AMT_DED)
    Next you can start you If statement since you have a value to compare it to:

    Code:
    If varAmount<>1250.00
    ...
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    replied to command button
    To open a from simply make a command button and in the code put:

    Code:
    doCmd.openform "FormName"
    And if you want to close a form through a button put this in the code:

    Code:
    doCmd.Close
    As far as the Surname value I am not quite sure what you are asking about that, please try explaining it differently. Are you wanting to say have a query in a from and be able to select a record from the query...
    See more | Go to post

    Leave a comment:


  • Using a variable to identify a field. I moved it there and I think I have described my situation a little more clearly.
    See more | Go to post

    Leave a comment:


  • tehgreatmg
    started a topic Using a variable to identify a field.

    Using a variable to identify a field.

    Here is My code for starters:

    Code:
    Select Case varMonth
            Case Is = 1
                varLongMonth = "January"
            Case Is = 2
                varLongMonth = "Feburary"
            Case Is = 3
                varLongMonth = "March"
            Case Is = 4
                varLongMonth = "April"
            Case Is = 5
                varLongMonth = "May"
    ...
    See more | Go to post

  • tehgreatmg
    replied to Table Auto Number Problems
    This is how I ended up doing it. Thanks for the help.

    Code:
    Dim db As DAO.Database
    Dim rs1 As DAO.Recordset
    
    
      Set db = CurrentDb() 
      Set rs1 = db.OpenRecordset("Query1") 
    
    	
      rs1.MoveFirst 
      i=1
      Do Until rs1.EOF
    
        rs1.Edit
        rs1![ID] = i
        rs1.Update
        i=i+1
        rs1.MoveNext
      Loop
    See more | Go to post

    Leave a comment:


  • Ok here is what I have right now. The problem I am having is with the NumOrdTotal = rs1!varLongMont h + Val(NumOrd) . I need to be able to define the field through a variable and open it up. Is it possible to do it somewhat like this and I am just missing something on the syntax or am I going to have to do and if or select statement saying || if varLongMonth = this then change this field || and do that for every record set?

    Code:
     Select
    ...
    See more | Go to post

    Leave a comment:


  • Yeah that is weird that it is doing this. Just fyi when you set the properties that pertain to the restore and minimize buttons, those properties only take effect when you are looking at the form through regular running view and not design view.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...