Here is what I would like to do...

I have a database dump which has includes a reference number I can use to in a form on the database, when I click a button on the form, it gives me all the information related to the reference number.

I want to be able to click a button on excel which launches Access, input the number into the field in the form and then hit the search button...

Im having problem with inputting the number into the field, here is what I currently have:

Dim accapp As Object
Dim DBApp As Access.Application
 
    Set accapp = CreateObject("Access.Application")
    accapp.Visible = True

ChDir "P:\"
    accapp.OpenCurrentDatabase databaselink
when I am in access I can just use something like this to show me the value:
me.IDCode.Value

however i cant do that in excel, anyone know the correct syntax?