View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Open an Acees Form from Excel

When using Excel as a front end, think of MS Access as a boring old
Jet DBMS i.e. it provides data and nothing else. Forms and reports are
front end tasks, so if you aren't using MS Access as the UI you can
forget they even exist. Automating MS Access to show a form isn't
appropriate.

In broad terms, here's what you need to do:

• Get the user input within Excel e.g. via a cell/textbox on a
worksheet, the VBA InputBox function, a textbox on a userform, etc.
How? Google it.

• Create a 'stored procedure' in you database that will accept the
user input as a parameter and return the required rows based on your
SELECT query. How? Look up CREATE PROCEDURE in Jet/MS Access help.
Here's an example which takes two dates as parameters:

CREATE PROCEDURE
MyStoredProc (
start_date DATETIME,
end_date DATETIME
)
AS
SELECT
RefID,
DateEffective,
Earnings
FROM
EarningsHistory
WHERE
DateEffective
BETWEEN start_date AND end_date;

• Use a data access technology to run your stored procedu MS Query
and ADO are the popular choices for Excel. How? Again, google it. As a
hint for MS Query, here's what should appear in the SQL window to run
the above procedure with parameters:

{Call MyStoredProc('01 JAN 2001', '01 JAN 2004')}

--

javydreamercsw wrote in message ...
Here's the situation:
I have an Excel Workbook related with an Access Database. I want to do
the following. Instructors will enter their ID in one field od the
workbook, push a button that will activate a SELECT * Tablename WHERE
ID= 'the one entered'. I can manage all that but here's where I need
the help. I need to open a form, in Access if posible, That will ask
for the info of the new professor. How that can be done?


---
Message posted from http://www.ExcelForum.com/