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

Create a masterlist of names and then go to selected record

Status
Not open for further replies.

Shusha

IS-IT--Management
Jun 27, 2001
50
CA
HI there,

I have this client master with a whole nuch of information. Most importantly client names, ( last name, first name) etc.. with MasternO as the master key.
I have an activity file with activity no as the master key. it also contains the master no and the 2 master numbers are linked to give activities report etc.
What i wld like is to create a list of all the clients and make a visible list made available for the user to browse through to select reqd. client and then based on the selected client pop up the associated activities for that client like a datasheet. is this possible. eg : if there are 100 clients and the client wants to choose record 27 that belongs to john doe, all of john doe's activities come up beside the list box and the data entry clerk can enter more activities. IF anyone can point me in the direction of how to do this, i wld be very grateful.
I have learned so much from these forums and am amazed at how much one does not know and how much one can learn if only we had the time. Thanks so much for all your input, in advance. Hope my mailo is clear
Thks
usha
 
Hi

Simplest way to do this is to make a form based on the activities table, showing the fields you are interested in.

On that form make a combo box (cboMaster) based on the master clients table, when asked by the wizard, choose the key field (master0), and the Name field(s), select the option to hide the key field.

In the after update event of the combo box put code like so:

Me.RecordsetClone.FindFirst "Master0 = " & cboMaster
If Me.RecordsetClone.NoMatch Then

Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Ken,

I tried ur method but keep getting errors. maybe i did not make myslef clear.
Right now, i have 2 forms, the main master, with the masterno and names and the sub form from the activity file. It works fine.. but the users are pretty old fashioned bunch ( over 60).. and the idea of filter seems like a daunting task for them ( ;[)))

That is why i thought if provided them with a list box and they can browse up and down till the cows come home, they can select the client and the realted activites based on the query i use for populating that form, is displayed. then they are free to add absed on the last date.

Personally, I wld like to see all the clients on the list like a datasheet view 9 on the left hand side and just scroll down to the desired client. and when i click that client his related activities pop up beside this client list box..

I have done this before, but just cant remember how I did it. It was easy then but i am lsot right now.. wld appreciate any help u can give me..the client can have as many as 150 records for that period.. that is why i wanted a datasheet view of his activities so they can add more activities based on his weekly tasks.

thanks for taking time explaining to me
usha
 
Hi

It would help if you showed your code, described what the errors are, and on which line they occured.

To use a datasheet view, it is still pretty much the same as I said.

You could put another sub form on your main form, with no master/child link fields set, to display the list of Clients, in the oncurrent event of that form, put code to pick up the client id of the current record and use that to set the filter of the main form (in code) and requery the main form.

By the way I am 56 so to me 60 is not 'old' (joke)

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top