This SHOULD be easy!

binghamw

BingleyW
Local time
Today, 14:05
Joined
Apr 22, 2004
Messages
57
Hi,

I have a main form where I (the administrator) update records fairly frequently. I may be constantly going back to the same records over and over again. So, what I would like to do, is have a button on the main form, which opens up a subform where I can do a search on the filename, and the appropriate record is displayed on the main form.

For example:

frmMain

frmSubmain

By clicking on the Search button [from frmMain], I open up frmSubmain and choose the file test.doc

Then, test.doc and all corresponding data is displayed accordingly on frmMain


I think this is fairly simple but I'm drawing a blank!!

Any suggestions?
 
The following thread shows how to use a combobox to open specific forms. Could this be adapted as a better solution than opening another form with a search function? Let me work on it.

Opening form from combox
 
Are you opening Word documents from outside Access on the main form?
 
No, it's a Data Dictionary.

Basically this is how it works:

It's a database for storing information about all the files on a shared drive. A user can go and find out about certain files, but can't actually access them. I am the only one who edits any of this data on the system.

It is set up so that the user can do a number of search methods, and will arrive at the desired file through cascading combo boxes. This works just great. What would be perfect would be to select the file I want to edit this way (because I've already got the search working well).

However, because I'm a relatively inexperienced Access user, I have done it a different way. In order for me to edit anything, I open a form where a password it to be entered - if the password is correct, I can open up a form for entering and editing all the data. However, when I open up the edit_data form, it is a pain to search through all the records to find the one I want. This is why I would like a search button. I have tried a combo box but it doesn't work both ways. ie, If I sort through the records, the combo box doesn't reflect it, but if I select the combo box, the text boxes show up with the same file as the combo box.

Does that make any sense?
 
Why don't you just copy the users' form, make it editable and give it a password?

I don't know where I got the following database, and I don't know how it works when the list gets big, but I think it might be the best way of searching. You can also convert the list box to a combobox and it still works.

Pierre.
 

Attachments

You can even make a different front-end for yourself on your computer, referring to the same back-end tables as the users and edit it from there in a completely open application.
 
Hey Pierre - I'm looking at the sample database you gave me, and it's great, that's pretty much exactly (I think) what I want to do.

I was just wondering - what version of Access does it use? I'm just going through it right now trying to get it to work on mine, and I've got a couple things that aren't working....

It may be because of different versions? I'm not sure.
 
It think it is 2000. I've adapted it to work in another database with many records, and it still works great.
 
Hey Pierre - I have tried to recreate the database just so I know how to use it. I keep getting error messages from these two line:


Dim db As DAO.Database

Search2.Value = vSearchString


What does the Search2 mean? I thought it was the name of a text box or something but can't seem to find it.

thanks,
Wendy
 
If you go to design mode in the original database, you'll see a textbox with its property visible set to no hidden under the listbox. That is what it is referring to. You probably have not repeated that object in your test database.

Also make sure you have a reference set to Microsoft DAO 3.6 Object Library, under Tools-References in the VBA-editor.
 
thanks pierre, that works a lot better!

the only thing that's not working now is that when I select the company that I want in the listbox, the corresponding records do not appear in the text boxes below it (it's set up like the example you sent).
I can't figure out why but it seems like it's something simple.
 
Forget my last question Pierre!!!

I figured it out!! Thank you so much!
 

Users who are viewing this thread

Back
Top Bottom