Jump to content

Ms Access 2007 set value with autoit


martinus
 Share

Recommended Posts

Hello everyone,

 

I'm new to autoit so forgive me when i start to ask stupid questions.

Here is what i'm trying to do:

I have in ms access 2007 a form with on that form a empty field, now i would like to let autoit fill this fiield with a value.
So i tried  to look with autoitinfo.exe to look for the class but  it only shows the complete form.

 

Anyone has a idea how to  solve this

many thanks for your answers en help

 

Link to comment
Share on other sites

This did the trick for me--assumes Access with desired DB is open. Warning, no error checking.
 

_AccessDBTest()

Func _AccessDBTest()
    $oAccess = ObjGet("", "Access.Application")
    If Not IsObj($oAccess) Then Exit

    $oAccess.DoCmd.OpenForm("Form1")
    $oForm = $oAccess.Forms("Form1")
    $oForm.Controls("Text0").value = "Test"
EndFunc

 

Link to comment
Share on other sites

17 hours ago, spudw2k said:

This did the trick for me--assumes Access with desired DB is open. Warning, no error checking.
 

_AccessDBTest()

Func _AccessDBTest()
    $oAccess = ObjGet("", "Access.Application")
    If Not IsObj($oAccess) Then Exit

    $oAccess.DoCmd.OpenForm("Form1")
    $oForm = $oAccess.Forms("Form1")
    $oForm.Controls("Text0").value = "Test"
EndFunc

 

Hello  Spudw2k,

 

Thanks for your reply, this did the trick for me 2.

Again thank you very much

 

Greets

 

Martinus

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...