Changing textbox values via VBA from excel

penfold1992

Registered User.
Local time
Today, 02:54
Joined
Nov 22, 2012
Messages
169
Hi,
I have a database dump in excel that gets sorted out via a macro to leave me with the "important records of the week".
I would then like the ability to click on a link to the access database which opens the database form, puts in the relevent record ID and then clicks on the "Search button" that finds the record.

The issue is that I dont know how to control the form from vba from inside excel...
I would normally use Me.RecNo.Value = *variable* to change the value of the record number but "Me" is not considered a function.

Is there a way to control the form from an excel vba module?

Code:
Dim accapp As Object
Dim DBApp As Access.Application
 
    Set accapp = CreateObject("Access.Application")
    accapp.Visible = True
    accapp.OpenCurrentDatabase -db link-

this is all I have at the moment
 
Couldn't you do something like the following?

Code:
Dim AccApp As Access.Application, AccFrm As Access.Form

Set AccApp = New Access.Application
 
accapp.OpenCurrentDatabase -db link-
 
Set AccFrm = AccApp.Forms("Whatever the frm name is")
 
' Then do something with it
 
That enabled me to get hold of the recordset all i need to do is "click the search button".

I tried accapp.Run Command10_Click but that didnt work...

Is there any way to activate the macro procedure done by clicking on the search button?
 
Sorry a little to busy to research the appropriate solution to help you finish what you want right now and if anyone can chime in and help that would be great otherwise I will get you the answer tomorrow or much later tonight if I get the time. Good Luck
 

Users who are viewing this thread

Back
Top Bottom