Search results

  1. W

    Copying Some Elements from One Array to Another

    The first array contains " " elements when a user inputs multiple spaces between words in the textbox of a form. My objective was to create a 2nd array that contained only those string elements which were not empty spaces. The 2nd array would be similar to the 1st array, but it would not...
  2. W

    Copying Some Elements from One Array to Another

    I didn't include all the coding in my first post. Definitions were simply: dim sNames() as String dim sNames2() as String The first array was populated by applying the Split Function to the contents of a form's textbox. Due to multiple spacing between words keyed into the form's...
  3. W

    Copying Some Elements from One Array to Another

    I am trying to copy the contents of an array [sNames] into another one [sNames2], but only if the element is NOT EQUAL to " ". My current code is: ==================================== Dim i, j As Integer j = 0 For i = LBound(sNames) To UBound(sNames) If sNames(i) <> " " Then...
  4. W

    Using Between with Like & *

    Hi, vbaInet. If the user does not fill in the 2 date fields, then I'd like the query to produce all records regardless of the date of each record.
  5. W

    Using Between with Like & *

    I have a form which feeds a query with a start date and an end date. In Query design, I use Between to limit the range of records to the requested date range. If the user chooses NOT to fill in the 2 dates text boxes on the form, can I use Like & * together with my Between criteria in the...
  6. W

    Rnd Function and Validation Check on Form

    I'm trying to generate a random number for a text box and then check to ensure that the generated number does not already exist in the table. I have attached a very small file (using ACCESS 2007). The range of generated numbers is very small (1 to 8) to keep the test manageable. I used the...
  7. W

    BeforeUpdate Vailidation for a Date

    Thanks, John. It works great.
  8. W

    BeforeUpdate Vailidation for a Date

    I have a validation check in the BeforeUpdate event for a textbox on a form. (It's a bound textbox used to fill in dates.) I am using Cancel = True to keep the focus on the textbox used for inputting dates. QUESTION: Is there a way for the previous date to be cleared? (FYI, I'm using ACCESS...
  9. W

    Changing Field of a Previously Saved Record

    Sorry about the lack of indentation on my coding. I don't know how to insert the coding the way it looks in VB editor.
  10. W

    Changing Field of a Previously Saved Record

    I'm trying to change 1 field (the nameID field) of the table tblCredits when the user says they want to change the name of the Director. Maybe I should show you part of the coding of the SAVE button: ' When entering a Director credit, check if the Episode already has a director...
  11. W

    Changing Field of a Previously Saved Record

    The SAVE button on one of my Forms does a validation check before saving the contents of 3 unbound text boxes. When there is already a record in the table with values identical to the contents of the first 2 text boxes, I use a Msgbox to ask the user if he/she wants to replace the value of the...
  12. W

    Row Source for Combo Box

    Hi, Bob. I'm still working on that tv episode db project. The first combo box lists functions or job titles: Executive Producer, Producer, Director, Script Consultant, Writer, Actor. These are from a table which I have called tblFunctions. The fields are: functionID, Function (Sorry for the...
  13. W

    Row Source for Combo Box

    I have 2 unbound combo boxes on a form. The row source for the 2nd combo box is based on a query, using SQL code. I'd like the SQL query for the 2nd combo box to change - depending on the selection made for the 1st combo box. So, is it possible to use some sort of If statement in the row...
  14. W

    VBA Code Changing Text Box Name

    I'll try inserting Me. before the control name. Thanks for the tip, Bob.
  15. W

    VBA Code Changing Text Box Name

    I'm using ACCESS 2007. The only explanation I can think of is this. I started with one file and made a duplicate copy of it, salvaging parts of it so that I wouldn't have to re-create everything from scratch. Perhaps that has something to do with it. In the VB Editor, I have checked the...
  16. W

    VBA Code Changing Text Box Name

    This might be something for the Forms discussion board. But it also involves VBA coding. I have 3 bound text boxes which I have placed in the footer section of a form. The footer section is invisible to the form user. The user enters data into 3 unbound text boxes which are visible and...
  17. W

    dlookup syntax - multiple criteria

    It works now. Thanks to both of you. FYI - The Function field is limited to a list of only 5 items: Executive Producer Producer Director Writer Actor I wanted to introduce the If coding to the Director function because 99% of the time only 1 person directs a tv episode. With all the...
  18. W

    dlookup syntax - multiple criteria

    The message from ACCESS says type mismatch
  19. W

    dlookup syntax - multiple criteria

    Access is still indicating there is a problem - although it was able to get further into the coding. It appears to be hung up on the coding following strDirector = Not sure what Access doesn't like about it.
  20. W

    dlookup syntax - multiple criteria

    Thanks, vbaInet. That was driving me crazy ! As for the use of the field name "Function", I should have realized the potential problems with it when I was setting up the tables. Completely slipped my mind. Thanks again.
Back
Top Bottom