473,411 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

VBA Function Assistance

166 100+
Hello,

I have a continuous for which allows my users to select from cascadinig combo material types and the cooresponding materials they would like to use to create a mix. when the user selects they pigment material, they have to input the pigment percent they are using...this is only true when they are using a pigment. My idea was to have in the form's on current event an IIF statement that said If material type is a pigment(cbo_matTypeId=4), make the text box visible, like so:

Private Sub Form_Current()

'If material type is a pigment(cbo_matTypeId=4), make the text box visible
If Me.cbo_matTypeID = 4 Then
Me.txtPigPercent.Visible = True
Else
Me.txtPigPercent.Visible = False
End If

End Sub

The issue I am seeing is that because the form is continuous, when the pigment is selected, it shows up for every record, not just the pigments. I tried to put it in the footer but the problem with that method is that if the user uses more than one pigment for a mix, the control being in the footer only represents the pigment percent for one pigment, not the possible many that may be used. How can I make the text box work, if the user has more than one pigment to input?
Dec 3 '08 #1
2 1111
ChipR
1,287 Expert 1GB
You can't set things for continuous forms in code (easily), but you can do formatting conditions and it will apply separately to each record.
Now, textbox.visible is not something you can control with a formatting condition, but textbox.enabled is.
So in design mode you set the txtpigpercent to disabled, in Conditional Formatting set to Expression Is (I'm not sure whether this was available before Access 2007) cbo_matTypeID = 4, and I don't know what that Icon is supposed to be but it's Enabled and it's next to the font color.
Dec 3 '08 #2
csolomon
166 100+
Hi Chip,

Once again, it worked perfectly. Thank you.

(I'm from Bowie, Maryland! Must be the MD Smarts!)
Dec 3 '08 #3

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

Similar topics

2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
0
by: Jawahar | last post by:
All I had posted this in the remote assistance group and could not get any replies so I thought that I could try in the developer group Thanks One of the issues we face when helping our remote...
1
by: Dalan | last post by:
I have tried both methods of using DSum and creating a Function to address summing some number columns, but to no avail. Since this has been a popular topic over the years, I'm sure I'll receive...
3
by: Dalan | last post by:
I need some assistance or advise in composing code for a global function module or a related one for populating values in text boxes on reports and forms with a name, actually several different...
0
by: Dalan | last post by:
Perhaps someone can share information on the methods to use to effect the automation process of creating the property to set the AllowBypassKey function. I was directed to:...
4
by: Dalan | last post by:
Perhaps someone can share information on the methods to use to effect the automation process of creating the property to set the AllowBypassKey function. I was directed to:...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
2
by: Rolan | last post by:
Need some assistance with regard to the following basic Function to change digits to text, i.e., 295.78 = RTELG. Any suggestions or ideas will be appreciated. Thanks. Function dtt(Cost As...
9
by: =?Utf-8?B?RGFya21hbg==?= | last post by:
Hi, I am wondering how you multi-dimension an array function? My declared function looks like this: Public Function GetCustomerList(ByVal Val1 As String, ByVal Val2 As Long, ByVal Val3 As...
3
by: gaurav92K | last post by:
sir i am working in a company . there are many pc. i want to use remote assistance. i configure all group policy which are related remote assistance.and i enable service through remote in system...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.