Hi,
I need to obtain the value of the selected item from a combo box. - BEGIN
-
IF :LOGIN_BLOCK.USER_TYPE = 'Student' THEN
-
:GLOBAL.student_id := :LOGIN_BLOCK.ID;
-
CALL_FORM(:GLOBAL.project_path || 'ENROLLMENT_FORM.fmx');
-
ELSE
-
:GLOBAL.staff_id := :LOGIN_BLOCK.ID;
-
END IF;
-
END;
That is the code I have to do this but it doesn't work, it always accesses the else section of the statement.
The LOGIN_BLOCK is the data block, and the USER_TYPE is the combo box that contains "Student" and "Staff".
I need the If statement to see which one is selected so that a global variable can be assigned a value and a specific form can be called.
Thanks
3 5129
Hi,
I need to obtain the value of the selected item from a combo box. - BEGIN
-
IF :LOGIN_BLOCK.USER_TYPE = 'Student' THEN
-
:GLOBAL.student_id := :LOGIN_BLOCK.ID;
-
CALL_FORM(:GLOBAL.project_path || 'ENROLLMENT_FORM.fmx');
-
ELSE
-
:GLOBAL.staff_id := :LOGIN_BLOCK.ID;
-
END IF;
-
END;
That is the code I have to do this but it doesn't work, it always accesses the else section of the statement.
The LOGIN_BLOCK is the data block, and the USER_TYPE is the combo box that contains "Student" and "Staff".
I need the If statement to see which one is selected so that a global variable can be assigned a value and a specific form can be called.
Thanks
Check below Steps:
1. Go to the property palatte of the COMBO BOX.
2. For the property "Element In the List", click on that.It will display LIST OF ELEMENTS WINDOW
3. Check the LIST ELEMENT and LIST ITEM VALUE associated with the LIST ELEMENT.
Eg: For LIST ELEMENT = 'Student' LIST ITEM VALUE also should be equal to 'Student'. Only then your IF condition will Work.
Check below Steps:
1. Go to the property palatte of the COMBO BOX.
2. For the property "Element In the List", click on that.It will display LIST OF ELEMENTS WINDOW
3. Check the LIST ELEMENT and LIST ITEM VALUE associated with the LIST ELEMENT.
Eg: For LIST ELEMENT = 'Student' LIST ITEM VALUE also should be equal to 'Student'. Only then your IF condition will Work.
Thanks for that mate, I got it about 2 hours ago.
I was surprised each element have a value associated with it. Makes it a bit more complicate.
Thanks, anyway.
Thanks for that mate, I got it about 2 hours ago.
I was surprised each element have a value associated with it. Makes it a bit more complicate.
Thanks, anyway.
You can make it simpler by associating a simpler value with each combo box items.
Say 0 from student and 1 for staff
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: cwizard |
last post by:
I'm calling on a function from within this form, and there are values set
but every time it gets called I get slammed with a run time error...
document.frmKitAmount.txtTotalKitValue is null or not an object... the
function is like so:
function calc_total()
{
var x,i,base,margin,total,newmargin,newtotal;
base = document.frmKitAmount.txtTotalKitValue.value;
margin = document.frmKitAmount.margin.value/100;
|
by: Terry Bickle |
last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4
macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB.
I'm sure there is a simple Access 101 answer for this.
I have a subform which the user selects an item description from a combo box
from a table. I want to obtain the cost for the item (another field in the
table) also. I've been able to produce the second data field by rewriting
the...
|
by: Zlatko Matić |
last post by:
There is a form (single form) and a combobox. I want that current record of
the form is adjusted according to selected value in the combobox. Cuurrent
record should be the same as the value in the combobox.
What is the solution?
Thank you in advance.
|
by: Brian Henry |
last post by:
say I have a databound combo box, which allows for text entry still
(DropDownStype = DropDown in this case).
now, If the user doesn't enter manually an item in the data bound list,
nothing should be selected of course, but I want if a user enters an item
that is in the list already, to select it, and only if the item is a
complete match to what they typed to be selected. This is kind of like an
auto complete scenerio, but allows for...
|
by: sara |
last post by:
I am learning how to use simple functions to make my apps more powerful
and efficient.
On one screen, I want to populate field B: ItemDescription by looking
up the ItemDescription in the Items Table. I would use the key to the
Items Table from the selection the user made in the combo box.
SO: User chooses an item from the combo box whose value is "3". I
want to look up the ItemDescription of the Item with the Key "3" and
show that...
| |
by: deko |
last post by:
Basic question about checking the value of
Toggle/Check/Combo/OptionGroups....
Checking like this:
If Me!chkCheckBox Then
...
End If
and like this:
|
by: sara |
last post by:
I have a form where the user selects an item from a list box, and then
works on that item. The user chooses an AD, then opens a form to
assign departments to the ad. The top of the Depts form has a combo
box, to select an ad from the drop down list.
I would like the Depts form to open with the Ad selected on the Main
form displaying in the combo box, AND any information already added
presented to the user. (I am thinking this latter...
|
by: Tony A. |
last post by:
The application I'm working on has three tables State, Customer, Orders. In
the first combo box the State is selected. Based on the State selected the
second combo box will be populated with the Customers in that state. Based
on the Customer selected a datagrid will be populated with the customer's
orders.
I setup the query for the secont combo box as follows:
Select CustName From tblCustomer
Where State = @cboState
|
by: Tim |
last post by:
I'm working on a form where a combo box gets its list of values from a
table. That same table also contains some "default notes" in other
fields. My task is simple, but I'm having a hard time working it out.
Once an option is selected in the combo box, I want to run (a macro?)
that will grab the appropriate default notes from the table, and load
them into the form in the various Notes fields.
I've got a query set up that'll narrow the...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |