Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: swk003
  • Order by date
  1. swk003

    TextBox Control Source = Last()

    I have been very silly....was trying to update TextBox2 with TextBox1 data from btnSave click event and not the SaveChanges()therefore the data was being scrubbed! thansk for your help and sorry for wasting your time!
  2. swk003

    TextBox Control Source = Last()

    i am trying to update textbox2 with the last record entered into textbox1, having just saved the record to a table! In Access this was fairly easy: Control Source = Last("textbox1") Is there an easy way to do this in VB.net??
  3. swk003

    setting combobox list forecolor?

    This worked great! Sorry for the delayed reply. Thanks again for your help!
  4. swk003

    setting combobox list forecolor?

    Does anyone have any quick code which will set combobox list items (3 items) to different colors. I want to set the following: index 0 = white, index 1 = yellow and index 2 = pink. I'm sure this is fairly simple just can't suss it out....
  5. swk003

    Limit Textbox input?

    Aha...regex does the trick..thanks for your help earthandfire. Here's the code: Dim myRegExp As System.Text.RegularExpressions.Regex If myRegExp.IsMatch(txtFileName.Text, "[0-9][0-9][0-9][0-9][0-9][0-9][1-2 or A-Z]") = True Then ' ok! MsgBox("Number Accepted")...
  6. swk003

    Limit Textbox input?

    Hi TopGiver can you help with some if..else nested syntax? If the first txtFileName.Text expression is true I want to evaluate if the txtFileName.Text number has a '1' or a '2' as the 7th digit. If the number is a '2' I want to set cboEyes.SelectedIndex = 1 else leave it as it is...problem is...
  7. swk003

    User Login DataReader?

    Hi Mansii Just the ticket. Does exactly what I need it to do and very simple. I had seen references to the ExecuteScalar method previously but wasn't sure how to use it. Thanks again!
  8. swk003

    User Login DataReader?

    I am having problems writing some user login DataReader code. I'm not entirely sure how the DataReader object works and have come a cropper when trying to authenticate the txtPassword data. Do I need to initialise 2 select queries (1) username (initials)(2) password (Login_ID), can i use a...
  9. swk003

    Limit Textbox input?

    Thanks Top-Giver...I was heading in the right direction, but this bit of code works perfectly: 'Dim myRegExp As System.Text.RegularExpressions.Regex 'If myRegExp.IsMatch(txtFileName.Text, "[0-9][0-9][0-9][0-9][0-9][A-Z]") = True Then ' ' ok! '...
  10. swk003

    Limit Textbox input?

    how do i limit entry into a textbox to either a 7 digit number or 6 digit alphanumeric string? I have tried the following code but no luck, is it a syntax error? can anyone help? If Not (txtFileName.Text = "[0-9],[0-9],[0-9],[0-9],[0-9],[0-9],[0-9]" Or txtFileName.Text =...
  11. swk003

    Wot no DLookup()?

    I am trying to recreate some DLookup code in .net.....but having some difficulties. All I want to do is lookup existing table data so as to validate against user textbox duplicates....if there is a duplicate record then provide an error message, followed by inserting the duplicate into an...
  12. swk003

    Textbox Number Validation

    Sorry my description was a bit vague and you are right...I would like to reset all the controls so that the user can make selections again, click save and then do the same process again etc.. I am sure that this was relatively easy in Access with the following code e.g. Me!cboF2TotalHE = ""...
  13. swk003

    Textbox Number Validation

    Me again Once the user has clicked the save button I am trying to refresh the forms combobox controls (so that the text property is displayed again), however I can't seem to find the correct code to do this... the only success I have had is by using the cboF2TotalHE.SelectedIndex = -1 code, but...
  14. swk003

    Textbox Number Validation

    Advice taken. Thanks again for your help in getting me up and running with this.
  15. swk003

    Textbox Number Validation

    aha..you are a genius. It works! how silly of me to be messing around with boolean logic. 1 question, I tried to change the cboF2TotalHE_SelectedIndexChanged event so that it could update all the other cbo's on the form (1) by hardwiring all the cbo's in as below commented code (which works...
  16. swk003

    Textbox Number Validation

    ok this seems like a more elegant way to approach this.. I have added a cbo as follows: Private Sub cboF2TotalHE_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cboF2TotalHE.Validating If (cboF2TotalHE.SelectedIndex = -1) Then...
  17. swk003

    Textbox Number Validation

    Hi TopGiver I have another problem which is related to the above but is down to my lack of clear understanding of boolean logic and whether to use an if....else statement, a case statement or a combination of them both. The conditional statement below fails and I am getting muddled with the...
  18. swk003

    Textbox Number Validation

    Thanks TopGiver for the 3 fine examples. They all worked. I have gone with ErrorProvider example for now, and added focus(), undo() and clear(). Here's the code: If Not (txtF2Total.Text = "0" Or txtF2Total.Text = "2" Or txtF2Total.Text = "9") Then...
  19. swk003

    RadioButton Data Binding Problem

    Problem solved. I set the default value for the radio buttons and checkboxes at loadtime. As follows: Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load dsLogging.PinkGradingLoggingData.Columns.Item("EyeRight").DefaultValue() =...
  20. swk003

    Textbox Number Validation

    Private Sub txtF2Total_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtF2Total.Validating I wish to validate a textbox (txtF2Total) to accept just 3 possible values: "0", "2" and "9". This was simple in Access however i am struggling. Can anybody...

Part and Inventory Search

Back
Top