Results 1 to 17 of 17

Thread: Help please to fill in simple details using a loop

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Help please to fill in simple details using a loop

    hi
    Could somebody please help me.
    I need to be able to fill in repetetive details in a form.

    Basically I need to be able to set the program running with a time delay of about 5 seconds before it starts, giving me time to open the form and click on where I want it to start filling in the details.

    I then need the program to fill in a number 2.47 then get it to press tab twice then write the number again then tab twice, etc etc looping about 50 times.

    I know it is a cheek but is there anybody who could help me with that. I have no idea how to do it, no programing skills at all.
    I am hoping that some kind person who knows how to do it may be able to
    write such a program in a minute or two and post the code. Obviosly I don't know how long it would actually take to write this code so if it was going to take 10 minutes or something i would not ask, i am hoping it is simple to do.

    I know I am risking getting abuse here, I am just trying to make a rather boring painstaking task a bit quicker to do. I am 51 years of age and not hat quick, so trying to learn how to write such code myself would probably take me for ever, which would not help me meanwhile.

    Thank you in advance if there is anybody who would be kind enough to help.

    qhost

    ps I am assuming that if i needed to I would be able to easily change the number that the program filled in and the number of times it looped for
    Last edited by qhost; Dec 22nd, 2006 at 03:45 PM. Reason: more info

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Welcome, young man! I am older than you. But still I do not understand what you are asking?
    Make a program that shall open another program and write something in between tabs?

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Help please to fill in simple details using a loop

    Hi Ember
    Thank you for replying.

    What I am doing is manually filling in a form, I fill a number in a box, I then press tab on the keyboard twice to take me to the box where I need to enter the same number again and press ctrl v to paste the number into that box. I do this may be 50 or 100 times, afterwards I may need to do the same again with a different number maybe 60 times, hence my hope that i could easily change the program when needed.

    I know somebody who used to be able to do very basic visual basic a while ago but they have forgotten how.
    However this person did tell me that a program could be written that would do this for me as it get's very tedious.
    He said that visual basic code could be put into "access" ( the database program ) which I have, he does know how to do that part.

    He said that I needed a program on which I could press run, I would then myself open up the form which I need to fill in, click in the first box where I needed the first number to be entered and then the program would kick in and fill in the numbers for me.
    Hence the 5 seconds or so delay needed before the program actually started, that would give me chance to open up my form and click in the relevant place.

    I hope this all makes sense, you may well know of a far easier way of doing things, but this sounded so simple for me to be able to control if only i could get the code needed.

    Thanks again

    qhost

  4. #4
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    To me it looks like you need a new unmade program coded the way you suggest. With textBoxes named or in an array so the right numbers can be entered and so on; specified through a routine you know, which also is able to fill in numbers on request. And then make this program put the final results into tables in a database?

  5. #5
    Lively Member Brian M.'s Avatar
    Join Date
    Nov 2006
    Location
    Moberly MO
    Posts
    94

    Re: Help please to fill in simple details using a loop

    You can do away with the delay process by opening the form with the focus set to the proper field. Then there is no reason to delay the program to click anything, hence making it more efficient.

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Help please to fill in simple details using a loop

    Sounds very complicated, to me anyway, not knowing anything about it

    My friend made it sound so simple, as though it would only be a few lines of code ( if had known how to do it )

    I thought it was just a matter of the program kind of telling the keyboard to press 2 then . then 4 then 5 then tab then tab. And telling it do that 50 times, and it would just do it starting from where I had placed the cursor, with a 5 second delay after pressing run before it set off doing it.

    Oh well if that is not possible I will just have to continue with the long drawn out mind destroying way I do it at the moment.
    It's a pity, I thought for a minute those tedious days may of been over.

    Thank you for the time you spent replying

    qhost ( Jed )

  7. #7
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: Help please to fill in simple details using a loop

    qhost, just start coding, send what you have with comments.
    We are here to help.

    Example:
    'Set delay in timer to 5 sec
    Private Sub Timer1_Timer() ' This will be executed every 5 sec
    Timer1.Interval = 5000
    ' Some code
    End Sub
    ' Need 50 loops and 2 text boxes
    For a=1 to 50 ' step 2 ? ' count by two's
    ' where do you want this data?
    strxxx1=Text(a).Text
    strxxx2=text(a+1).text
    next a

  8. #8
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Quote Originally Posted by qhost
    I thought it was just a matter of the program kind of telling the keyboard to press 2 then . then 4 then 5 then tab then tab. And telling it do that 50 times, and it would just do it starting from where I had placed the cursor, with a 5 second delay after pressing run before it set off doing it.
    Yes it is possible, but very unsteady. And it has to be done coded in your Access application. May be some in the Office forum is more familiar with that. Although the code is the same, you can make the updating of the database more plainly.

  9. #9

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Help please to fill in simple details using a loop

    Hi Brian M. & sessi4ml
    Thank you for your input.
    I dont understand any of the terms or indeed what they do.
    If I want to learn how to start coding where can i find out what I need to know, rememmber I am a 100% novice no idea about any of it, is there anywhere on the web that you can recommend with tutorials that would start at my level that I could understand.
    And also is it possible to get visual basic to do what I want it to, if i set out down the road of trying to learn how to do it i would like to know there will be a day in the future that those long tedious days will be behind me. And how far down the road would it be in learning terms before I could write such code.

    thanks

    qhost

  10. #10
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Well, we all have learned it! I started as well grown up ... But I can make some suggestion just over christmas or there around. Do you have time to wait?

  11. #11

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Help please to fill in simple details using a loop

    Yes Ember
    I would be gratefull of any suggestions whenever you are able to make them.
    The fact that there could be light at the end of the tunnel is something to look forward.
    Have a nice Christmas

    qhost

  12. #12
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Thank you and Same to you!

  13. #13
    Fanatic Member sessi4ml's Avatar
    Join Date
    Nov 2006
    Location
    Near San Francisco
    Posts
    958

    Re: Help please to fill in simple details using a loop

    qhost, do you know how to place a text box on the form?
    Do know how to move data into and out of a text box?

  14. #14
    Lively Member Brian M.'s Avatar
    Join Date
    Nov 2006
    Location
    Moberly MO
    Posts
    94

    Re: Help please to fill in simple details using a loop

    Yes, perhaps some more details as to what you are trying to accomplish would help us to better understand your problem so we can help you come to a solution. But in the meantime here are a few links to beginner vb 6.0 tutorials to get you started.. Enjoy, and happy coding..

    VB Tutorials
    Last edited by Brian M.; Dec 23rd, 2006 at 05:22 AM.

  15. #15
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Just to let you know, you are not forgotten:
    http://www.mvps.org/access/resources/downloads.htm
    Last edited by Ember; Dec 28th, 2006 at 09:58 AM.

  16. #16
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: Help please to fill in simple details using a loop

    Time to start ?
    This is a link to sendKeys: http://www.devx.com/vb2themax/Tip/19094
    If you have an Access application, it's probably best (and easy) to do the coding into that. If you want another app to send keystrokes to the existing, we have a whole other situation and much more unstable. Still interested? Send or upload some code.
    Have a nice new Year!

  17. #17

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Help please to fill in simple details using a loop

    Thanks Ember that's excellent, sorry it has taken so long to acknowledge your efforts on my behalf.
    much appreciated, I am going to give that a go, i will let you know how i get on.

    thanks again

    qhost

Posting Permissions

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



Click Here to Expand Forum to Full Width