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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Click on Cell in excel to select access database record?

Status
Not open for further replies.

Geo13647

Technical User
Aug 14, 2004
6
GB
Hi,
My users need to be able to click on a cell in an excel sheet. (this would be an alphanumeric part number)
This action needs to take them to the record in a database for that part number.
The process needs to be dynamic, as the sheets change regularly.
I'm sure it's possible, but how?

any ideas people?

Ta much,
Geo13647...
 
what database application ??
What kind of table ??

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
was an Access database, but now migrating to a mainframe
system, using Attachmate Extra!.
I can talk to extra ok using VBA.

my problem is getting a dynamic record selection
by clicking on one of the part num cells, to obtain the data to send to the mainframe app.

Standard excel table:-
part num input date Notes
----------+---------+------
ABCD123654 23/07/04 records update
XYAD566899 16/06/03 new item added

tables can be up to 5000 records long.

any clues or starters, much appreciated.
ta,
George...
 
Hmmm - would be easier in Access (mainly 'cos I have no experience of "Attachmate") but nevermind

The basic principle is to set a reference to the database and then create an instance of it - from there, you just program like you were actually in the database. A few points to start with

To start the code, I would use the "Before_DoubleClick" event
Within this, to get the part number you can use
Code:
dim PartNum as string
PartNum = target.value

Once you have that in a variable, it is a case of opening the database, opening the correct table and using the native find / query functionality with the PartNum variable passed as the parameter to find

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
and an apology for my initial queastion because it clearly stated in the thread title that it was for Access - sorry 'bout that

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top