Thank you!
Robert
![]()
Thank you!
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
-----------------------------------------------------
Dim ptrProfile as Long
Dim dbProfile As Database
Set dbProfile = OpenDatabase(strPath & "\" & strFilename)
Dim rsProfile As Recordset
Set rsProfile = dbProfile.OpenRecordset("tblProfile")
rsProfile.AddNew
rsProfile!Description = "bla bla bla"
rsProfile.Update
ptrProfile = rsProfile!ptrMenu <-- Primary key, Autonum
-----------------------------------------------------
According to one of my Access books this should place the new key into ptrProfile but it doesn't.
Am I supposed to set special parameters for update? Like UpdateNow or something like that? I see references to Cursor Types and Record Locks but I can't figure how to use them.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Hi,
Try that.
Best regards,
Luciano
Code:rsProfile.AddNew rsProfile!Description = "bla bla bla" ptrProfile = rsProfile!ptrMenu rsProfile.Update
Last edited by Luciano; - 31st August 2006 at 20:02.
Thanks.
I got the SendKeys sample from the Help file working nicely:
AppActivate Shell("calc.exe", 1)
For I = 1 To 100
SendKeys I & "{+}", True
Next I
SendKeys "=", True
SendKeys "%{F4}", True
How could I modify it so that I don't hardcode the executable? I'd like to be able to chose what running application gets focus.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Have you tried something simple like
dim TargetAppName as String
.....
TargetAppName = "calc.exe"
.....
AppActivate Shell(TargetAppName, 1)
Keith
www.diyha.co.uk
www.kat5.tv
Hi,
Under most circumstances, SendKeys is not recommended in a production environment.
This is because the keystrokes are processed by whichever window is currently active
on the desktop. Obviously this will cause unpredictable behavior in case another app
receives the focus while your code is processing the Sendkeys statement.
If you're unlucky, the keystrokes sent to application may cause all documents
to be deleted or the hard drive to be formatted.
So try to avoid Sendkeys at all cost.
Best regards,
Luciano
Luciano, The whole reason for this application is to send keystrokes to an application.
Keith, That's how the Help file does it, I had shrunk it down a bit for testing.
I was hoping there was a sort of 'list' feature of running applications that I could scroll through; something like ALT-TAB. But now that I think more about it, similar applications make the user select the executable (like the Profiler for the Logitech wheel). By forcing focus on a selected executable, I reduce that danger that Luciano brought up.
Robert
![]()
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Bookmarks