How to Display MS Access Forms

Started by Jeremy Whilde, July 30, 2013, 11:19:50 AM

Previous topic - Next topic

Jeremy Whilde

I can connect to MS Access databases and run queries using WinBatch  but how do you say display a record as a result of a query?

So in VBA I believe you would use:

DoCmd.OpenForm "Employees", , ,"LastName = 'King'"

Is there a way to do this in WinBatch?

Could not find any direct examples:

Thanks JW

JTaylor

Take a look at Dynamic Dialogs.

Jim

Jeremy Whilde

I need to display the MS Access forms directly in Access not create something external.
I cannot change any of the forms, the database and the front end in Access is not ours and the customer
Just wants the existing forms displayed in Access from the result of a WinBatch query. Can this be done?

As I say the connection and query is not an issue but how to show the relevant form in Access is what we need to do.

Thanks JW

Deana

Deana F.
Technical Support
Wilson WindowWare Inc.

stanl

Quote from: Jeremy Whilde on July 30, 2013, 11:54:28 AM
I cannot change any of the forms, the database and the front end in Access is not ours and the customer
Just wants the existing forms displayed in Access from the result of a WinBatch query. Can this be done?


Depends. Is it a 'compiled' Access DB, i.e. you cannot open anything in design view?  Years ago, I wrote WB code for a company that had a proprietary access app. and wanted to change the logo on the reports. Simple a matter of creating a phantom access db, linking the tables and re-designing the report with the new logo which then accepted queries performed in WB. 

This may or may not apply to your situation.

Jeremy Whilde

OK seem to be getting somewhere now so I can sort of do whats required like this:

accObject = ObjectGet(, "Access.Application")
Cmd = accObject.DoCmd
Cmd.OpenForm("Contacts", , ,"FirstName = 'Randall'")

So this will as long as Access is running open a record from "Contacts" and only display a record where
the first name is 'Randall' this does a replace rather than moving to the record though. Have not worked
out how to move to/display a record in a list yet or how to and together qualifying fields on the contact form.

Thanks JW