MushroomKing
Registered User.
- Local time
- Today, 09:36
- Joined
- Jun 7, 2018
- Messages
- 100
Hello dear people of Access world!
I have a question concerning passing data from a form with Sendkeys and looping until the last record.
- So i have a table with measurements and weights.
- I have a form based on this table with all the records.
- Access will open a program that we use and pass data with SendKeys
(for now i use notepad to see what happens fysically)
It has to take the first record and pass it through, then the procedure needs to loop until the last record and the code ends with a MsgBox or something like that.
What the best approach for looping through these records?
Thanks in advance guys!
I have a question concerning passing data from a form with Sendkeys and looping until the last record.
- So i have a table with measurements and weights.
- I have a form based on this table with all the records.
- Access will open a program that we use and pass data with SendKeys
(for now i use notepad to see what happens fysically)
It has to take the first record and pass it through, then the procedure needs to loop until the last record and the code ends with a MsgBox or something like that.
What the best approach for looping through these records?
Thanks in advance guys!
Code:
Private Sub Command0_Click()
MsgBox "Please don't use the keyboard or mouse during the process. Thanks!"
AppActivate "notepad"
'first start ======================
SendKeys "{7}"
SendKeys "{ENTER}"
SendKeys "{ENTER}"
SendKeys Me.length
SendKeys "{ENTER}"
SendKeys Me.width
SendKeys "{ENTER}"
SendKeys Me.height
SendKeys "{ENTER}"
SendKeys Me.nw
SendKeys "{ENTER}"
SendKeys Me.bw
SendKeys "{ENTER}"
SendKeys "{ENTER}"
SendKeys "{F12}"
SendKeys "{7}"
SendKeys "{ENTER}"
SendKeys "{ENTER}"
SendKeys "{ENTER}"
'first end ======================
End Sub