How to access the value of a dynamic checkboxes
Hello,
I have a userform with a dynamic set of checkboxes.
Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
I'm giving the name of each checkbox multiple parts because there will be multiple rows of checkboxes.
How can I know if checkbox_1_1 is checked or not?
I have tried
For Each cont In Me.Controls
If cont.Name = strCtrlName Then
'cont.Value doesn't exist
End If
Next cont
The value property is not showing up.
Thank you for any help
Maybe you've got your strCtrlName wrong, this worked for me
Private Sub UserForm_Initialize()
Dim i As Long
Dim counter As Long
counter = 5
Dim chkBox As MSForms.CheckBox
For i = 1 To 3
Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
chkBox.Left = 9
chkBox.Top = i * 20
chkBox.Caption = chkBox.Name
Next
End Sub
Private Sub UserForm_Click()
Dim i As Long
Dim counter As Long
counter = 5
Dim chkBox As MSForms.CheckBox
For i = 1 To 3
Set chkBox = Me.Controls("Checkbox_" & counter & "_" & i)
s = s & i & "=" & chkBox.Value & " "
Next
Me.Caption = s
End Sub
Paste the above into an empty userform and run it. Tick a couple of checkboxes and click the form.
Maybe look into WithEvents in a class module to trap and act on checkbox changes in real time.
Similar Messages
-
How to access the value of application item in javascript
How to access the value of application item in javascript?
Hi,
One way
var myVariable = '&MY_APP_ITEM.';Br,Jari -
How to Access the value(Ex: Delivery no) From Web to R/3 side.
How to Access the value(Ex: Delivery no) From Web to R/3 side.
Any sample code please suggest.
saiHi,
Try RSA3.
Extract Checker
/people/sajeed.ms/blog/2006/02/12/extract-checker
Thanks,
JituK -
How to access the value of a field of a field symbol.
Hello All,
i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
Am pasting my code below, please tell me what needs to be done.
here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
FUNCTION z_39181_dyn_fs_60758.
""Local interface:
*" IMPORTING
*" REFERENCE(PARAMETER) TYPE VBELN
*" TABLES
*" DATA_TAB
BREAK-POINT.
FIELD-SYMBOLS <fs> TYPE ANY.
FIELD-SYMBOLS <fs1> TYPE ANY.
FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
DATA name(5) VALUE 'POSNR'.
FIELD-SYMBOLS <f> TYPE ANY.
DATA: dref TYPE REF TO data,
dref1 TYPE REF TO data,
dref2 TYPE REF TO data.
DATA: lv_lips TYPE string.
DATA: lv_lipsfld TYPE string,
lv_fld TYPE string,
lw_lips TYPE lips.
lv_lips = 'LIPS'.
lv_fld = 'LW_lips-POSNR'.
CREATE DATA dref1 TYPE (lv_lips).
CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
CREATE DATA dref2 LIKE LINE OF data_tab.
ASSIGN dref->* TO <fstab>.
ASSIGN dref1->* TO <fs>.
assign dref2->* to <fs
<fstab> = data_tab[].
LOOP AT <fstab> INTO <fs>.
lw_lips = <fs>.
WRITE lw_lips-vbeln.
ASSIGN (lv_fld) TO <fs1>.
write <fs>
ENDLOOP.
Helpful answers will be rewarded...Use syntax
ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>. -
How to get the values of 2 dynamic comboboxes in one jsp to another jsp?
I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
Select.jsp:
<%@ page language="java" import="java.sql.*" %>
<%!
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql = null;
void addItems(javax.servlet.jsp.JspWriter out, String sql)
try{
rs = st.executeQuery(sql);
while( rs.next() )
out.println("<option>" + rs.getString(1) + "</option>");
}catch(Exception e)
System.out.println(e);
%>
<HTML>
<HEAD>
<TITLE>JSP WITH MULTIPLE FORMS</TITLE>
<script language="javascript">
function checking()
form1.submit();
</script>
</HEAD>
<body>
<center>
<b><font size="5" color="#333399">Staff ID:</font></b></center>
<FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
<p align=center>
Details of Staff :
<SELECT 1 NAME="type" onchange="checking();">
<option> Administrator </option>
<option> OfficeAssistent </option>
<option> Clerk </option>
</SELECT 1>
</p>
</FORM>
<FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
<center>
<TABLE><TR><TD>Staff ID:</TD>
<TD><SELECT 2 NAME="staff_id">
<%
String type = request.getParameter("type");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
catch (ClassNotFoundException ex) {
System.out.println(ex);
catch (SQLException ex)
System.out.println(ex);
st = con.createStatement();
sql = "select staff_id from "+type+"";
addItems(out, sql);
%>
</SELECT 2>
</TD>
</TR>
</table></center>
<h2> Details of <%= type + "s" %> </h2>
<center><input type=submit value=ok onclick="submit();"></center>
</FORM>
</BODY>
</HTML>
welcome1.jsp
<center><h1>WEL COME</h1></center>
<%
String type = request.getParameter("type");
String sid = request.getParameter("staff_id");
%>
<h2> Details of <%= type + "s" %> </h2>
<h2> Details of <%= sid %> </h2><SELECT 1 NAME="type" onchange="checking();">
<option value = "0"> Administrator </option>
<option value = "1"> OfficeAssistent </option>
<option value = "2"> Clerk </option>
</SELECT 1> -
How to access the value of the editorDataField="value" to the actionscript file
Hi ,
I have a itemRenderer component(button) in the datagrid ,I am
catching the label of the button (when changed )using the property
in the <dataGridColumn> tag .
My tag looks like this
<mx:DataGridColumn headerText="ABC" dataField="COL1"
rendererIsEditor="true" editorDataField="value"
itemRenderer="renderer.buttonRenderer" editable="false"/>
I need to access the value of the editorDataField in to my
actionscript file ,
Can any one please help me
thanks
NashHi,
if it is the current row, use this.getCurrentRow().getAttr() where the attribute can be identified by the index or a String (its name). If you need to access aspecific non-current row, use getRowAtRangeIndex(int index)
See: http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7Cserver%7CViewObjectImpl~html/
Frank -
ADF 11g + How to capture the value of a dynamically created input text box
Hi All,
I have a requirement where, on selection of the value in a drop down, the input text boxes need to get dynamically populated on the JSPX page. I'm able to bring this functionality, and it is working fine.
But the challenge right now I'm facing is that, how to read/capture the value entered in those dynamic text boxes on submission of the page. Please help me in getting this resolved.
Below is the code snippet I'm using for this.
// Clearing the existing input fields in the Panel form
while (pf100.getChildren().iterator().hasNext()) {
pf100.getChildren().remove(pf100.getChildren().iterator().next());
// Creating the new fields based on the number of IP addresses selected
for (int i = 0; i < iIPAddress; i++) {
RichInputText pcPreferredDomain = new RichInputText();
pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
(i + 1));
pcPreferredDomain.setColumns(40);
pcPreferredDomain.setId("pcpfdomain" + (i + 1));
pf100.getChildren().add(pcPreferredDomain);
Thanks All in Advance,
Thanks & Regards,
Dharmathej MAs per your method, you are creating the RichInputText components as local variables.
What happens when you are creating them as class level variables in the managed bean, if you do so, you can refer to the values of the UI components in the actionListener/action code for the command button in the managed bean
sample:
public class ManagedBean{
RichInputText [] pcPreferredDomain;
public ManagedBean(){
// Clearing the existing input fields in the Panel form
while (pf100.getChildren().iterator().hasNext()) {
pf100.getChildren().remove(pf100.getChildren().iterator().next());
pcPreferredDomain = new RichInputText[iIPAddress];
// Creating the new fields based on the number of IP addresses selected
for (int i = 0; i < iIPAddress; i++) {
pcPreferredDomain[i] = new RichInputText();
pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
(i + 1));
pcPreferredDomain.setColumns(40);
pcPreferredDomain.setId("pcpfdomain" + (i + 1));
pf100.getChildren().add(pcPreferredDomain);
Thanks,
Navaneeth -
How to access the value of fiedl ( select list with redirect )
WE created one report and form. When i click in the edit button of the report
for the specific record ; the system go automatically in the form
and show me all the information. In my form ia have some fields ( select list with redirect ) in this way i store the key but i can see the description.
I want to control the delete operation in checking the value of some field
in my form. How can i do that. When i verfy the content with SESSION
my variable are empty
Thanks
Marc FortinHello Larry,
You can use a select list with submit and create a branch to the page you want to go to.
Hope that helps.
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
How to change the values of variant dynamically
hi
I am working on building a wrapper program which sets the background job for another transaction CFM1.
I have a small problem, the variant attributes for a particular field MATNR has been manually changed such that it picks up values from TVARVC. The variable name in TVARVC is MATERIAL.
If I want to programatically set the selection variable as 'T' and variable name as MATERIAL which table do I need to change.
please let me know <b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoHi,
If your problem is not solved try this.
For the particular variant.
Select the variable 'T' and the field , u call it, MATERIAL. In the code fill the value of this paritcular MATERIAL variable in the TVARVC table i.e the LOW field in the table.
Now pass the variant along with the program which u want to run in the background.
Hope this helps.
If you have tried any other way let me know.
Regards,
Anand Patil -
How to access the structure of a dynamically created context node/element
Hi All,
in method wddoinit I have added a context node and some attributes
lo_node = wd_context->get_child_node( name = wd_this->wdctx_instructors ).
lo_node_info = lo_node->get_node_info( ).
lo_node_info = lo_node_info->add_new_child_node( name = 'OCCUPANCY'
is_mandatory = abap_true
is_multiple = abap_false
is_multiple_selection = abap_false ).
lo_node_info->add_attribute( ls_attr ).
So far, I have node INSTRUCTORS (0...n) with a subnode OCCUPANCY (1...1)
In the supply_method of INSTRUCTORS I would like to fill the instructors node and the OCCUPANCY subnode.
The thing is I do not know the structure of the dynamicaly created subnode OCCUPANCY there. How can I get a description of this node (that, what in non-dynamic programming would be wd_this->element_occupancy...)??
THANKS,
Johannes...I got this one solved by myself...
I simply added this coding:
lo_node_info = lo_node->get_node_info( ).
lt_attributes = lo_node_info->get_attribute_names( ).
This appers to be enough information to be good to gogo
Thanks anyway. -
How to access the form items dynamically
The issue here is that I want to acces the value in the textboxes dynamically
Here is the code ( I know its wrong )
<cfset temp = TaskEntryIDs.Split(',') />
<cfloop index="x" from="1" to="#arrayLen(temp)#">
<cfset TempControl = "Form.t"&temp[x]>
<cfif isdefined("Form.t"&temp[x])>
<cfoutput>#"Form.t"&temp[x]#</cfoutput><br/>
</cfif>
</cfloop>
I don't know the correct way to access it, I know that the textbox name start with T and the task number
I know that the textbox for the task number 74 is t74, but how can I access the value of this text box so I can insert it into to the database ?
Please help me
ThanksArray Notation:
Form["t" & temp[x]]
StuctKeyExists() is an easier function to determine dynamic form fields exist.
<cfif structKeyExists(form,"t" & temp[x])> rather then isDefined(). -
How to store the value into variable and access it in RMAN script
I want to create a variable and dynamically assign a numeric value to it (may get the value may be from SQL )and access the value in RMAN script.
Thanks...RajRaj,
We have been getting this type of request and it is not possible via RMAN to do that.
BUT--You could write a sql/plus script to query your variable and produce the RMAN script with the new value.
Just a suggestion.
Tammy -
How can I access the values in ProfileArray of a CWIMAQProfileReport?
Hi all,
I'm not sure if this is the right board, but I didn't find one related to VB and NI Vision.
I'm using LineProfile2 from CWIMAQVision1 which gives me a ProfileArray which is a variant. I'd like to access the
values in the array. Normally I would do it like
Report(1).ProfileArray(i)
but that does not work. I can get the bounds of the array with LBound and UBound. I can observe the array in
debug modus and it contains reasonable values.
How can I get access to the contents of the ProfileArray?
Thanks in advance
AxelHi Elmar,
thanks for paying attention to my problems.
I use Vision 8.5. My email adress is [email protected]
I don't need the hole intensity of the image/2D array. I only need the
intensity values of a given line which should be a 1D array of bytes.
I use the following command
CWIMAQVision1.LineProfile2 Image, Line, Report
When I understood the command correctly the intensity values are
in the Report. I would get them with
Report(1).ProfileArray(i)
But that does not work. I get a runtime error #450.
Other stuff with the report works and gives reasonable values e.g.
Report(1).PixelCount
LBound(Report(1).ProfileArray)
UBound(Report(1).ProfileArray)
Or passing the hole array to plot the values also works
frmLineProfile.CWGraph1.PlotY Report(1).ProfileArray
Best regards,
Axel -
How to pass the value dynamically in exp/imp utilities of oracle
I want to pass the value of org_grp_i dynamically,instead of passing the value
19.Can you please tell how to write the script to this
exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=19 \"
where xxxxxx is the password
ThanksYou need to make use of command line arguments. You can go through this link for example.
http://www.freeos.com/guides/lsst/ch02sec14.html
In your shell script(say test.sh) you can have
exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=$1 \"$1 indicates it accepts the first argument from command line. if you want to pass 19, add that next to the script you're executing.
From command line you can call this shell script say test.sh 19 -
How can we access the value set to a search criteria's attribute
Hi guys,
Is there any way to access the value which was set to a search criteria's attribute programmatically in the backing bean?
Regards !
SameeraCheck sample 85 from the adf code corner sampleshttp://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf
Frank shows how to access the variables.
Timo
Maybe you are looking for
-
Problem building schema in JDeveloper with user defined complex type.
Hi, I am facing proble in JDeveloper while assigning input. 1. Used Oracle BPEL Database Adaper to access the procedure in Oracle DB which accepts input in the form of record typ in database. 2. XSD file is automatically created. 3. BPEL process WSDL
-
Why does the background on my 24" iMAC turn light blue?
I find that frequently the background on my 24" iMAC turns blue. This happens when using Word and Firefox. Any suggestions on likely cause?
-
How to use BAPI function 'BAPI_QUOTATION_CREATEFROMDATA2'
This function is giving error message saying that 'insufficient parameter'. Can I get mandatory fields which needs to be passed to create quotation. If any one have answer please reply ......
-
Issue with Safari and / or 2011-02 Security Update???
Updated our iMac and Macbooks to above. Since that point, Airport Utility (AU) can not find the Airport Extreme (AE) from either Macbook. The Macbooks can attach to the AE - just that AU can not find it. However, our iMac AU - hard wired ethernet
-
I am trying to upgrade my zenworks agent version from Version 4 to a newer version of 4. However it won't upgrade I get the following error. Internal Error 2356: Data1.cab. What does that mean?