mtagliaferri
Registered User.
- Local time
- Today, 01:07
- Joined
- Jul 16, 2006
- Messages
- 519
I have a form that displays data in 'Continuous Form' and the following settings in the property form, the record source is from a query:
- Data Entry = No
- Allow Additions = No
- Allow Deletions = No
- Allow Edits = No
- Allow Filters = Yes
This is perfect as when the form is opened there is no risk to erroneous alterations, the downside is that on the header of the form I have a nice search text box to fileter/search specific records, of course with the above settings I cant type in the search box!
Any solutions to deny any changes in the form but to have access to the search box?
the search box has the flowing code:
- Data Entry = No
- Allow Additions = No
- Allow Deletions = No
- Allow Edits = No
- Allow Filters = Yes
This is perfect as when the form is opened there is no risk to erroneous alterations, the downside is that on the header of the form I have a nice search text box to fileter/search specific records, of course with the above settings I cant type in the search box!
Any solutions to deny any changes in the form but to have access to the search box?
the search box has the flowing code:
Code:
Private Sub CmdSearch_Click()
Dim strSearch As String
Dim strTxt As String
strTxt = Me.TxtSearchBox.Value
strSearch = "SELECT * from qryCrewMemberList where ((StaffNumber like ""*" & strTxt & "*"") or (Surname like ""*" & strTxt & "*"") or (FirstName like ""*" & strTxt & "*"") or (CallSign like ""*" & strTxt & "*"") )"
Me.RecordSource = strSearch
Me.RecordSource = Replace(strSearch, "{0}", Me.TxtSearchBox)
Me.TxtSearchBox = ""
End Sub