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 strongm 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: xuanb
  • Order by date
  1. xuanb

    Populate textbox based on dropdown selection?

    Yuhuuu! Working like a charm...Thanks a lot Adam and have a great holiday! Xuan
  2. xuanb

    Populate textbox based on dropdown selection?

    I have a simple registration form with a dropdown menu for courses (eg. 101 Javascript, 202 ASP). I want to automatically write the course date and tuition to a textbox. I have a hunch that I wanna use a switch statement and that i have to pass the option value as a parameter but I'm stuck at...
  3. xuanb

    I hate DSum! :-) Please help, newbie STILL can't get it to work!

    Bob, I used your 1. solution with =Sum([field]) but the problem I get is when the query of the subform returns null, i.e. no rows. For example when students have no classes registered and therefore no credits. I've tried If IsNull(Forms!MainForm!SubForm!Credits) Then Me.TotalCredits.Visible =...
  4. xuanb

    Combine 2 collumns in 1 text field

    Yes! With a little modification... Me.myfield = DLookup("[ClassID]", "tblClasses", "[ClassID] = 101") Me.myfield = Me.myfield & " " & DLookup("[ClassName]", "tblClasses", "[ClassID] = 101") Thank you for your help! Xuan
  5. xuanb

    Combine 2 collumns in 1 text field

    Hi, I want to query 2 collumns and display the result in one text field. Here are my 2 Dlookups that I want to combine into something like "101 Access Forms". Thank you! Me.ClassID = DLookup("[ClassID]", "tblClasses", "[ClassID] = 101") Me.ClassName =...
  6. xuanb

    Messagebox/Login window focus problem

    Thanks again Rob! Just what I needed.
  7. xuanb

    Messagebox/Login window focus problem

    I tried your code snippet and modified my sql statement to WHERE username = :ls_usnInput AND password = :ls_pwInput. That part is working swell! To improve user friendliness, how would i check for the pw separately and return focus to the pw field if the uid is correct so the user doesn't have...
  8. xuanb

    Messagebox/Login window focus problem

    I am a PB newbie. I want to create a Login window and check for username/pw and display the appropriate error message. If incorrect clear the SingleLineEdit field and set the focus to enter a new username/pw. Here's my code: //Local variables String ls_usnInput, ls_pwInput, crs_name, crs_pw...
  9. xuanb

    Opening form in add mode?

    Steve, I read this thread 702-548238 and noticed your comment. "If you need the form to be flexible and change its mode between data entry and non data entry mode, then this can be done programmatically." Can you please follow up with this? How do I check if the >* button for adding...
  10. xuanb

    Loop thru text boxes with different names

    Lightning and thunder!!! :-) :-) :-) Exactly what I needed. And so quick, too. Thank you so much, Jeff!
  11. xuanb

    Loop thru text boxes with different names

    I have many rows of text box pairs that need to display the result of a function call. There's more to it but the bottomline is I want to loop thru a collection and concatenate the text box names accordingly and display the result in the text box. I am stuck because sofar...
  12. xuanb

    Loop thru collection to use as query criteria

    I have 10+ rows of textboxes that return calculated fields based on different criteria stored in the db. I want to avoid repeating a query 10+ times when the collumn name and the criteria change. So my idea is to create a collection and loop thru the elements to modify the query. Here's what I...
  13. xuanb

    Loop thru form fields and plug value into query

    I want to avoid repeating a query 11 times (number of form fields to be populated). My idea is to create a collection and loop thru the elements so the query can be modified on the fly. Here's what I came up with sofar: Sub TestColl() Dim rst As New ADODB.Recordset Dim cnn As New...
  14. xuanb

    Set SQL of Query with VB?

    If I understand you right SQLString and qryQueryname are both the same thing. What you want is SQLString = "SELECT * FROM tblYourTable;" Me.RecordSource = SQLString RecordSource is a Form Property
  15. xuanb

    Store each field of a recordset in its own variable?

    I got an out of bounds error. I believe you forgot to increment the AbsolutePosition. If Not rst.EOF Then 'Populate recordset so we can use the RecordCount property rst.MoveLast rst.MoveFirst End If ReDim MyVars(rst.RecordCount - 1) 'Dimension the array (zero-based)...
  16. xuanb

    Store each field of a recordset in its own variable?

    Hey, the stars are bright and the possibilities endless...I'll save this as a code snippet May I ask you something about the VBE since you mentioned Public and Form Module? I can't run any code in the Immediate Window when I'm in the Form Module. When I hit F5 my functions and subs don't even...
  17. xuanb

    Store each field of a recordset in its own variable?

    YEAH! Thanks for jumping in Norris68! ...this is the best forum in the world
  18. xuanb

    Store each field of a recordset in its own variable?

    John, Thanks for your reply. I got this loop structure. The problem is I would like to store EACH record in a NEW variable. i.e. if there are 4 records I want 4 different variables at the end of the loop. With this loop the variable overwrites itself and in the end only holds the last record...
  19. xuanb

    Store each field of a recordset in its own variable?

    Hi, How do I loop through a recordset and store each field in a variable. I need these variables to perform some calculations and I don't want to hardcode them because they are part of the business rules (like commission type stuff) that might change and then should only be changed in the...
  20. xuanb

    bound combobox UNWANTED save when closing form

    Yes, you have keen eyes. The RowSource of the combos are based on sqlFormRS, the record source query of the form. sqlFormsRS is pulling columns from tblRegions, tblPrisons, tblFacilities that are joined by their IDs. tblRegions tblPrisons tblFacilities RegionID PK...

Part and Inventory Search

Back
Top