×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

excel/access event procedure

excel/access event procedure

excel/access event procedure

(OP)
I am having a problem calling a access event procedure from excel. I added a button to envoke the procedure (as recommended in another therad).
what I really want to do is look at a cell in excel take the value and then enter that value in a text box in access.  that text box in access uses a event procedure (onupdate) to update the rest of the form baised on the value in the text box.  SO I addes a hidden button on the access form called hiddenbutton and now I get a compiler error expected =
this is probally SO easy for some of you to figure out....
but I am stumped

Private Sub CommandButton1_Click()

Dim appAccess As Object
Dim en As String
Dim r As Integer
Dim c As Integer
Set myrange = Range("A10:A60")
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "M:\rds.mdb"
appAccess.docmd.OpenForm "ESU form"
appAccess.Forms![ESU form]!txtEN.SetFocus
r = 1
c = 1
For r = r To 50
en = myrange.Cells(r, c)
If en = "" Then
r = "50"
Else
appAccess.Forms![ESU form]!txtEN = en
appAccess.Forms![ESU form]!cmdhiddenbutton.Click()
End If
Next r
appAccess.Application.Quit acEXIT
Set appAccess = Nothing
End Sub



please help
Todd
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources