Restrict User To Modify Field Selected In Combo Box?
Jan 7, 2012If there are fields in a combo box as i press the drop down arrow. and if i select a field... then it should not b deleted using a backspace or anyother key..
View 3 RepliesIf there are fields in a combo box as i press the drop down arrow. and if i select a field... then it should not b deleted using a backspace or anyother key..
View 3 RepliesWhen the user open the form a textbox is displayed that picks up data from a table. If they click Change button a combo box is displayed that allows them to change what was originally in the textbox. The combobox is updated with whatever was in the textbox as shown below.This all works fine but the user can add something in the combo box that is not in the list which is bad.
cmbAddBook.Visible = True
cmbAddBook.Text = txtAddBook.Text
txtAddBook.Visible = False
[code]....
Is it possible to deactivate a combo box once a user has selected an option?
View 1 RepliesI am creating a program that allows a user to view a list of foods in a combo box, add that food unto a list box, and adds all of the calories of that food together. When the user highlights their select food, the program automatically shows the amount of calories for that particular food in a text box. The program is getting the food and calorie information from an access database. I managed to get all of the food calories to add up properly, however, I ran into a problem. Sometimes, well, most of the time, when I select certain foods from the combo box, the program automatically reselects another random food, usually a food that begins with either an A, B, or C. Also, the other random food that the program chooses usually has the same amount of calories as the food I originally wanted to choose. I have over 6,000 items in the database. I don't understand why this is happening. This is what my code looks like for the button that adds each food to the list box:
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
Foods_Selected.Items.Add(ComboBox1.Text)
Static i As Single
[CODE]...
And this is what my code looks like for the button that adds all of the foods together:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim x As Single
Dim TotalCalories As Single
[CODE]...
I have no idea what to try. It's like the program just skips over random foods, even though all of the information for them is in the database.
i am using vb.net 2005 to developed desktop application I am having two windows form user control , the first control name con.vb containing the design and code for connecting to database and getting a list of my project values in combo box.
Now the second user control report.vb which i am using to generate some reports , since the code behind is using connection to connect to various project database , so i want to get the value of
First user control into another how i can get the i have tried the below but its giving me error in run time but no error in design or code behind -
MR.MainForm.Connection1.project_combobox.SelectedV alue.ToString
Error i am getting is :
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MDR"
How to use a databound combo box to display one field in the drop down, and another as the combo box text on roll up? Using VS 2005... For example, I have a datatable that has 2 fields. One called "ShortDesc" and one called "LongDesc". I want to be able to see the "LongDesc" column values in the drop down on the combo box. When I make a selection, I want the text in the combo box to read the corresponding "ShortDesc" value.
[Code]...
I have a simple query that fills a datatable from an Access DB. There are about 1.7 million records returned, so I would expect it to take a little time. At first, the query was a very simple one, and it took a couple seconds to fill the datatable. However, I really wanted the ability to restrict the rows by a certain date field, which meant a single INNER JOIN to a different table. Having written this, I verified that it was correct by copying the SQL string into the query builder in Access. The query, in Access, took a couple seconds to complete. That was comparable to the time I was seeing before I added in the join.
However, in VB, the query isn't completing at all. After 60 seconds, I get a message about a ContextSwitchDeadlock stating that it hadn't been able to transition or pump messages in a long time. Frankly, since the exact code works fine when I remove the JOIN, this seems like it is either a deadlock internal to the Jet engine, or the error message is an artifact of a very long running query. My question is why a query (albeit a large one) is hanging in the VB program when the exact SQL runs in a couple seconds in the Access query designer, and when I remove the JOIN, the query runs in a couple seconds in VB?
how do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box. i have this code for now but it does not work
[Code]...
How to restrict user to do rating only once..i m using AjaxControlToolkit Rating Control i VB.NET!
View 1 RepliesI thought I postet this yesterday but I can't find my thread so if this is a duplicate please point me at the original one. Background: I need to create a user account and Modify it's registry before the user logs on the first time. Creating the account is done by using the Winnt provider (works great). To create the profile I'm trying to use Process.start to launch a process as the newly created user. With the use of loaduserprofile property the users profile gets created and i can do my regwrites without problem.
[Code]...
I have a ASP.Net Web application hosted on a server. I want to restrict same user to login on different machines over the network connection but with certain conditions to be satisfied. So I thought of adding three new columns to the User table so that we can track if same user is logged in on same or different machines.
Those columns are like :
IsLoggedIn : To check if the particular user is already logged in or not.
SessionID : To check if the same user instance is opened.
IPAddress : To check if the same user is on same or different PCs.
This should satisfy some of the below conditions, but it fails to satisfy some of them. Conditions are as follows :
Both computers are on the same LAN.
Each computer is accessing the application over the internet from different locations.
Each computer is accessing the application over the internet from the same location.
Some of the application hosted which means that IP address alone is not sufficient to distinguish different computers.
Some users just close the browser without logging out. So sessions may not be ended at this situation.
How to accomplish all these conditions to satisfy with my application ?
Mainly 4th and the 5th .
I want that when the application exe file is running at that time the database associated with the application shud be closed....Means...I am using the .mdb file.
View 3 RepliesHow to restrict user to select not more than 10 asp.net checkboxes on button click event , if user select more than 10 checkboxes then alert box will pop up that you can not select more than 10 checkboxes
View 7 RepliesI have an vCard application that needs to read vCard Data, and have found a RegularExpression which gets the FieldName, Encoding and FieldValue from the file, here it is below:
^(?<FIELDNAME>[w-]{1,})(?:(?:;?)(?:ENCODING=(?<ENC>[^:;]*)|CHARSET=(?<CHARSET>[^:;]*))){0,2}:(?:(?<CONTENT>(?:[^
]*=
){1,}[^
]*)|(?<CONTENT>[^
]*))
This Regular Expression Reads these kind of values fine:
ORG:Company
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:RoguePlanetoid
However I want it to read these values also
TEL;WORK;VOICE:0200 0000000
Without skipping them. How can I modify the RegularExpression so TEL;WORK;VOICE ends up as part of the "FIELDNAME" and 0200 0000000 is part of the "CONTENT".I am unfamiliar with complex RegularExpressions and cannot figure out how to modify it, there is a regular expression that gets these:
^(?:TEL)([^:]*):(?<TEL>[^
]*)
However it only gets the FieldName as "TEL" and I need the whole value for this so I can tell the numbers apart in my application.If possible the Regular Expression would read the WORK and VOICE elements also like the CHARSET and ENCODING in the current regular expression, so they can treated like an Attribute and Type for example, however anything which allows the Regular Expression to read the whole TEL;WORK;VOICE as the FIELDNAME will be fine.
Edit
^(?<FIELDNAME>[^:]{1,})(?:(?:;?)(?:ENCODING=(?<ENC>[^:;]*)|CHARSET=(?<CHARSET>[^:;]*))){0,2}:(?:(?<CONTENT>(?:[^
]*=
){1,}[^
]*)|(?<CONTENT>[^
]*))
Reads up to the first Colon which covers the Whole FieldName, however it would be nice to store each SemiColon Element in a seperate item such as ATTRIBUTE or TYPE.
modify RegularExpression to Parse vCard/vCalendar to allow a particular field type?
View 5 Replieshow do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box i have this code for now but it does not work
j = 0
Do While j < cmbSession.Items.Count
If (j <> lesson) Then
[code].....
Is it possible to restrict a user from opening a sub folder like "permission denied" message should display while trying to open the folder. If yes, help me to solve this using vb.net in winform as well as using vb.net in asp.net
View 3 RepliesI want that when the application exe file is running at that time the database associated with the application shud be closed....Means...I am using the .mdb file...is there any way that when the application starts, if the user has opened the .mdb file then it shud be closed and also that when the application is running no one shpuld be able to open the .mdb file....
View 5 Repliesi have to find a string in an array. i am using array.indexof method to get the index of matched item. now problem is that indexof method comparison is case sensitive and i cannot restrict user to provide case sensitive string.[code]
View 3 RepliesIf i double click on the dataset. i am not sure which statement to write to restrict the user so that he/she cannot enter the date in the past. i have droped the data set on the form and my data entry is through datagrid view.
View 13 RepliesI have developed a windows services that Log On As "Local System" account with Statup Type "Automatic". I understand that windows services starts before user logins. But I want my service to start when ever user logs in.
View 3 RepliesI have folder in my asp.net website i have following pages inside admin folder login.aspx, home.aspx, welcome.aspx..i want if user directly open page welcome.aspx or anyother page inside admin folder then it automatically redirect to login.aspx till they login using admin id and pass.how to do this setting in web.config...using authorization vb.net
View 1 RepliesI have a login page, which a user will have to enter username, password and accesslevel. Accesslevel is either 1 or 2. 1 for admin and 2 for users who are restricted from using certain functions. I have this module set up so that I can make use of the accesslevel throughout the forms that I have.
Module ModuleAccessLevel
Public AccessLevel As Integer
End Module
Arjun taught me how to make use of this module, so now I know how to restrict users from using certain buttons, toolstrips by doing the following:
[Code]...
I am currently writing a program that needs the use of a database. At the moment I am trying to get a simple combobox working.The problem I am having is that I have never done any work with databases and VB08.I am using an access database that has the fields SMTP, Port, SSL
I want to populate a combo box with the field SMTP and from there I want 2 other labels to be filled in with the port and ssl details I was wondering a) How do I set the connection up with Visual Basic (within the database I am using MySQL to get the information) b) How do I go about populating the combo box?
I have a databound ComboBox on my form. Is there any way that I can make the first field blank.
I can do this with a DropDownList in the HTML part of .Net but is there a way to do it for a ComboBox?
I'm creating a BASIC application, and I can't figure out how to save a user selected file (FolderBrowserDialog) to a location selected in another dialog (SaveFileDialog).
View 5 RepliesHow to take a value from a combo box and have it update a field in sql table?
View 1 RepliesHow do we get combo box's selected value in asp.net as we use to do in classic asp??
View 2 RepliesI am trying use barcode for input but prevent user to modify the barcode they scan, user are not allow to input the barcode number by keyboard. i am using vs 2010 vb.net
View 11 RepliesI have a combo with 6 text NA,PO,FA,GO,VG,EX and I want to do a Linq query upon the selected value in this combo used as field in the where clause. for example:
'if "NA" is selected :
Dim query = from t in db.table where t.NA > 0 Select t
'If "PO" is selected :
Dim query = from t in db.table where t.PO > 0 select t
How to do this in elegant way without writing 6 if statement or using "Select case"