Author Topic: How to Display MS Access Forms  (Read 3902 times)

Jeremy Whilde

  • Jr. Member
  • **
  • Posts: 52
How to Display MS Access Forms
« on: July 30, 2013, 11:19:50 am »
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

  • Pundit
  • *****
  • Posts: 1085
    • Data & Stuff Inc.
Re: How to Display MS Access Forms
« Reply #1 on: July 30, 2013, 11:33:45 am »
Take a look at Dynamic Dialogs.

Jim

Jeremy Whilde

  • Jr. Member
  • **
  • Posts: 52
Re: How to Display MS Access Forms
« Reply #2 on: July 30, 2013, 11:54:28 am »
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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Deana F.
Technical Support
Wilson WindowWare Inc.

stanl

  • Pundit
  • *****
  • Posts: 998
Re: How to Display MS Access Forms
« Reply #4 on: July 30, 2013, 12:24:28 pm »
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

  • Jr. Member
  • **
  • Posts: 52
Re: How to Display MS Access Forms
« Reply #5 on: July 30, 2013, 03:02:42 pm »
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