PDA

View Full Version : Solved: Disable replace tab on find and replace box



Trevor
03-16-2008, 02:23 PM
I would like to disable or hide the replace tab on the find and replace box in access, so that users may only you the find tab
thank you for helping, I haven't tried anything because on this one I don't know where to start

Oorang
03-17-2008, 09:28 AM
Hi Trevor,
Welcome to the board. One way to do it is here: http://www.mvps.org/access/general/gen0039.htm However this method has several drawbacks.

Another way would be to replace the find/replace buttons with calls to your own search form, or to simply disable it altogther.

Trevor
03-17-2008, 10:35 AM
thanks, if I make the table read only won't that stop users from adding, or updating records(on the fields they are allowed to update?

Trevor
03-17-2008, 11:30 AM
just a thought( fyi:the power supply died in pc last night , hince why I'm asking, the "simplest" of questions, without trying it)
Orrang: could I take the scipt in the link you sent me and instead of .add, .delete just use .replace = falese (replace would hopefully refere to the replace tab)

Trevor
03-17-2008, 02:36 PM
I just found this thread but suposedly you can modify the find/replace by
http://msdn2.microsoft.com/en-us/library/ms646956(VS.85).aspx

Trevor
03-17-2008, 02:50 PM
since you have braught up the custom find dialog box as an option,I am intrested in playing with the idea and trying it out,
but am having trouble with it.
I would like to set the control soucre of the find dialog to what ever the control source of the from it was braught up from ie if I click a button for the custom find dialog on form1 with a control source of tableA I would like the controle source of the find dialog to be TableA,
I have Tried using on the find dialog box textbox 1
[vba]
Textbox1.Controlsource = Me.Form.recordsource
End Sub
[\VBA]
but that doesn't work
I would also Like the information that is found to populate their respective textbox(s) and radio button
, I would like to add a listbox that lists in plain english what the the user wants to find ie: Last name, but I can onclick for the find button

If list1.value = "last name" then
= dlookup("LastNametablefield", [Tablename]......) ' well Im writing my dlookup in a hurry, but I think Im on the right track with the dlookup., am I?

Sorry for my rambling, and hopefully my thinking "outloud" didnt confuse you :-p
couldn't I also take the info from the find dialog and create a query that would order by what the user is looking for, so then when the go to the next or previous record, (assuming there is more than one entry of what they are looking for) the form fields would the populate with the next match of that criteria, but hide the query results(the datasheet that normaly appears if use the access query builder, (thinking outloud again)... do an Rst loop instead of a dlookup.

Oorang
03-18-2008, 05:48 AM
Hi Trevor,
There is a pretty good example here: http://allenbrowne.com/ser-62.html

Trevor
03-22-2008, 09:36 PM
I figured it out, the quickest way is to simply set the ailow edit propory of the form to no, and the replace tab is gone, if you have controles on the form that the user may need to update , they can still updaee those controle( I tested it, and it appears to work)

Trevor
03-22-2008, 09:37 PM
hey Arron I should add that to the kb :beerchug: ha ha

Oorang
03-24-2008, 03:32 PM
If it's not in the KB (I haven't checked) go for it. Be sure to credit reused code in the comments.

Trevor
03-24-2008, 03:44 PM
ok, but there ih no code its a very simple setting to change :beerchug:

Trevor
03-24-2008, 03:45 PM
I was joking about adding it to the KB but it seems to be so usefull, that i'll add it just because

Trevor
03-24-2008, 03:45 PM
I was joking about adding it to the KB but it seems to be so usefull, that i'll add it just because