473,545 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering a form with "Allow Edits=false"

16 New Member
Hi

I am on Access 2003 on XP.

When I set a form to allow edits = false, combo boxes on that form that are not data bound become locked also. I used these for filtering purposes,ie, users can filter the form on a combo click.

Is there any way to leave these enabled when allow edits = false?

Thanks

AKC
Nov 26 '07 #1
6 3336
puppydogbuddy
1,923 Recognized Expert Top Contributor
Hi

I am on Access 2003 on XP.

When I set a form to allow edits = false, combo boxes on that form that are not data bound become locked also. I used these for filtering purposes,ie, users can filter the form on a combo click.

Is there any way to leave these enabled when allow edits = false?

Thanks

AKC
Try placing this code behind your form:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCombo_GotFocus()
  2. Me.YourCombo.Enabled = True
  3. Me.YourCombo.Locked = False
  4. End Sub
Nov 26 '07 #2
atkellyx
16 New Member
Try placing this code behind your form:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCombo_GotFocus()
  2. Me.YourCombo.Enabled = True
  3. Me.YourCombo.Locked = False
  4. End Sub

Thanks but that was the 1st thing I tried and has no affect whatsoever.

I am thinking the allowEdits is applied at the form level and overrides all form (data type) controls.

Even moving said combo into header/footer doesn't work.

Buttons work, and I could open a filter form but this is a pain. I would have to retrofit this fix to a large number of forms.

Ooooh, the pain, it's all too much, think I'll get a job picking coconuts instead.

Thanks

AKC
Nov 29 '07 #3
missinglinq
3,532 Recognized Expert Specialist
I think the problem with puppydogbuddy's code is not the code, but where it's placed! You can't change a property of an object such as Locked or Enabled when that object has the focus! Try it in the Form Load event instead!

Linq ;0)>
Nov 29 '07 #4
puppydogbuddy
1,923 Recognized Expert Top Contributor
I think the problem with puppydogbuddy's code is not the code, but where it's placed! You can't change a property of an object such as Locked or Enabled when that object has the focus! Try it in the Form Load event instead!

Linq ;0)>
Linq,
Good catch! You are absolutely correct. I was not thinking.......
Nov 29 '07 #5
atkellyx
16 New Member
Linq,
Good catch! You are absolutely correct. I was not thinking.......
Thanks but that's where I tried it. It still doesn't work.

Cheers

AKC
Nov 29 '07 #6
puppydogbuddy
1,923 Recognized Expert Top Contributor
Thanks but that's where I tried it. It still doesn't work.

Cheers

AKC
Ok, then why can't you just set the allow edits property to true whenever the combobox gets focus, and set it to false when it loses focus.
Nov 29 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

15
2112
by: Jordan Rastrick | last post by:
First, a disclaimer. I am a second year Maths and Computer Science undergraduate, and this is my first time ever on Usenet (I guess I'm part of the http generation). On top of that, I have been using Python for a grand total of about a fortnight now. Hence, I apologise if what follows is a stupid suggestion, or if its already been made...
3
2565
by: Vic | last post by:
Dear All, I have a database of laboratory records in Access 2000. There is one form which acts as an interface to input experimetal data. This form incorporates information from several tables. I have a flag (yes/no field) indicating whether a particular experiment (one record) is completed (ie all data belonging to that record is inputted...
0
1919
by: Privacy Trap | last post by:
Hi I have a slight problem in trying to set up 2 forms linked to tables. What I want to do is to inform a control on one form(Apps) as to the value of a key of a 'new' record entered via a second(Clients) In opening the second form I set up certian fields and controls on it from the first. In doing so however this seemingly creates a...
16
2132
by: Andrew Baker | last post by:
I am trying to write a function which provides my users with a file filter. The filter used to work just using the VB "Like" comparision, but I can't find the equivilant in C#. I looked at RegEx.IsMatch but it behaves quite differently. Is there a way I can mimic the DOS filtering of filenames (eg. "*.*" or "*" returns all files, "*.xls"...
2
2055
by: \A_Michigan_User\ | last post by:
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... How would I trap/detect that a textBox contains some illegal characters? (I'm using asp.net v1.1 and vb.net) Thanks.
1
6453
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located...
30
3633
by: Brian | last post by:
I am using Borland C++ Builder 5 for my application. When I build my application, it states that I have several if-statements that will always be false. The statements appear correct, so could someone please enlighten me as to how C++ Builder may think that the conditions will always be false. See below. Thanks. <snip> td.expMon = trk2 *...
9
11156
by: Jamey Bon | last post by:
As a newbie to C#, I am not sure what I can do about this. I would like to do something like an Enumeration to use "constants" like Yes to indicate true and No for false. But since there seems to be no underlying 0 or non- zero for boolean values in C#, I am not sure how to handle this. Any advice would be appreciated. Thanks, JB
1
3498
by: thread | last post by:
Hi i'm trying to build a backup plan for a module in case there is a need fo a fix during a proccess is it posible to tick and un-tick the "All Full menus" option in the startup menu
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.