Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command button to open new form from a given form (recreating database)

Status
Not open for further replies.

mbrayc

MIS
Jan 5, 2012
50
US
Hello all,

I am using Access 2007 to recreate a database originally created in Access 2003 that is no longer accessible due to a corrputed form, and my Access experience is limited. I was able to import the data into the new database from the old, but the problem remains with the original form. The database in question keeps track of maintenance work performed on various assets in a factory (welders, fabricating machines, etc.) through multiple tables. The end users of the database run Access 2007 Runtime, and the database is set up to open to a Assets form (which was the form that corrupted - and apparently more than once). This Assets form displays a line for each machine asset in the company with the following information:
- Department (where the asset is located)
- Asset Category ID (basically asset type (air compressors, welders, etc.))
- Asset Description
- Model (make, model, and/or year)
- Next Scheduled Maintenance (date)
- A "Go To Record" button

As it was supposed to work, clicking the "Go To Record" button was supposed to bring up a Maintenance form (with a subform), which would allow the users to enter new maintenance information. When the button is pressed, Access just filters the form down to that single assetID, with the same contents as listed above (showing the latest maintenance performed on that asset), including the Go To Record button. If the button is pressed again, nothing happens.

Here's the select criteria for the button:
SELECT DISTINCTROW Assets.* FROM Assets WHERE ((Assets.AssetID=forms!Assets!AssetID!));

The button appears to be doing what it should when clicked according to that code. When I open the database and close the Assets form, then try to open the Maintenance form from the Navigation Pane, I get an "Enter Parameter Value" popup window, and the information requested is "Forms!Assets!AssetID!". If I enter any value, I get an message stating "Open the Maintenance form using the Maintenance button on the Assets form." There's no maintenance button in either database.

Any thoughts?

Thanks in advance.
 
Hello again,

I found a roundabout solution to the problem. Found a hidden development version of the database elsewhere on our company network under a different name, and with very old data. I then created a new database in the Access 2002-2003 format (same as the problem database). I imported the tables from the problem database (since that data was most current) in this new database, but the other content (forms, etc.) from the development database. Ran several test scenarios by myself and with the end users and found everything satisfactory (so far).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top