Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Jan 2008
    Posts
    9

    Unanswered: Access97/vba code

    Hi, I am working with Ms access 97 on a form with two (2) text Boxes, lets name them TextBox1 and TextBox2, i will put values in it (numbers) like "1"or any other number.Example: TextBox1 = 2 TexBox2 = 2
    I want the value in TextBox1 to be added every day to the value in TextBox4.
    That means that after 5 days TextBox2 will show a total of "12".
    I think the program has to be tide in to the computer system Date and Time.
    And I don't know how to do it.
    If anyone can help me, please reply to this forum or my personal email.
    My E-mail:zak@acmenet.net
    Thank You
    Zaky.

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Where is the control source of textbox4 stored is it bound or unbound?

  3. #3
    Join Date
    Jan 2008
    Posts
    9
    Rorque,
    There should be only 2 textBoxes, textbox1 and textbox2.
    they could be unbound to runnned with vba code ,if they are bound the code should go to the control source textbox on the properties sheet,thats what i think.
    zaky

  4. #4
    Join Date
    Jan 2008
    Posts
    9
    I need to make a correction on the thread i put out today 1\29\08
    there is no textbox4,it should read textbox2.
    I am sorry for the mistake
    zaky

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    It's Rogue, not Rorque

    Can't you just make Textbox2 set to a formula based on a start date?

    Such as:

    TextBox1 * DateDiff("d", StartDate, Date())

    Is this what you are after?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I want to know what the point in this problem is... what are you trying to solve?

    Smells like homework to me...
    George
    Home | Blog

  7. #7
    Join Date
    Jan 2008
    Posts
    9
    Rogue:
    Thanks for the idea,i will try to use that.Also if a "Loop" will work?, count the value in textbox1(must add up every day) and display the total it in textbox2.
    I'm doing this just as a hobby.
    thanks
    zaky

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Store the values in a table complete with a datestamp for each day and then calculate the toal on the fly when you need it!

    Access is a database; take advantage of that
    George
    Home | Blog

  9. #9
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    I'm not sure what you would Loop through. I don't understand what you are trying to accomplish, but it sounds like you need to use either datediff or a sum function in textbox2.

  10. #10
    Join Date
    Jan 2008
    Posts
    9
    I already trying the "datediff" that rogue suggested, tomorrow I'll see if it is working.
    Georgev thanks for the suggestion will try them all.
    thanks
    zaky

  11. #11
    Join Date
    Jan 2008
    Posts
    9
    How to change a copy of my own database(Accsess 2002-03 Database) from "READ ONLY" to Archive.
    Thanks
    zaky

  12. #12
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    open explorer
    find the fiel
    select the file
    right click to pull up properties
    deselect read only attribute
    select advanced button, select as required.


    or got to a DOS session
    attrib \full\path\to\the\file.extension -R

  13. #13
    Join Date
    Jan 2008
    Posts
    9
    Hi,Healdem
    I tried what you suggested, but it keeps switching back to Read only.
    Any Other idea?
    Thanks
    Zaky

  14. #14
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sounds familiar.

    I've seen that before and the file is NOT read-only.

    Probably not much help, but if it's the same problem as I encountered back then, you can just ignore it as the file will behave fine even tho it appears to be read-only.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  15. #15
    Join Date
    Jan 2008
    Posts
    9
    Hi,
    I created a database to record all the house expenses,then i copy(burn)the database to a cd when i open the database on the cd i get a prompt"warning this database is "Read Only" you wont be able to make any changes" or something like that,and it does not allow me to make any changes.
    when i change the attribute from read only to archive it switches back to "Read Only" and I am logged in as the administrator.
    I thank you all for your help.
    I'll keep looking for a solution.
    Thanks again
    zaky

Posting Permissions

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