Search results

  1. D

    Refer to a form control in a query based on whichever form is "active"

    I'm not sure if the title of this post makes any sense. Basically, I'm trying to figure out how to refer to a control on a form in a query criteria based on whichever form is "active." The scenario is I have many forms where I have a form control that retains a "master ID" and another control...
  2. D

    Referring to Subform Control in a Conditional If Statement

    I'm finally getting back into my database design after months of other "special project" distractions and needing to knock the dust off of my novice VBA. I have a form and associated subform. I have a command button on the form that has an On Click procedure to determine if values in two of the...
  3. D

    Dynamic Combo Box - Change List on Previous Selection - Or "Check All That Apply"

    Dynamic Combo Box - Change List on Previous Selection - Or "Check All That Apply" I have a combo box that looks up the values in a table on one of my forms. I'd like to add the combo box a few times to allow the user to make more than one selection from the list (check all that apply...
  4. D

    Loop Through Controls to Require User Entry

    Thanks Paul. That was the general syntax I've been trying. The following code looks at each control and pops up the message box as many times as there are controls on the form. How do I get it to basically loop through and if any are null have the message box display once? Private Sub...
  5. D

    Loop Through Controls to Require User Entry

    This should be easy but I've tried several versions of a For Each statement and have had no success. The following code works, but I'd rather loop through the controls without naming them and have the code do the same thing. Basically, if any of the controls are null, the On Click to pull up the...
  6. D

    Combo Box Not Clearing

    Thanks for the ideas. I'll give them a try today now that I'm back in the office. GT Husky - you're right that the combo box filter is unusual. This dbase is for conducting field surveys from a tablet PC. So any amount of records that requires using the scroll bar inside the combo box could be...
  7. D

    Combo Box Not Clearing

    I have a combo box on a form that is based on a query. The combo box lists the 100 counties that are in North Carolina. I also have an option group with 27 controls - one for each letter in the alphabet that when clicked, provides a parameter to the query to only show the counties in the combo...
  8. D

    Use Option Group to Filter Combo Box Values

    Please disregard my previous post. I figured out the syntax for the range. Code below for the record... Private Sub grpCountyListCategories_AfterUpdate() Dim strCriteria As String Dim strSQL As String 'code to narrow the county option group values by first letter Select...
  9. D

    Use Option Group to Filter Combo Box Values

    Thanks Sean! This worked like a charm. Is there a way to refer to the letters as a range, instead of listing them individually. The code you provided works strCriteria = "'A','B','C','D','E'", but I may want to change the range in the future. I tried strCriteria = "'[A-E]'"and a couple other...
  10. D

    Use Option Group to Filter Combo Box Values

    I have five options in an option group: [A-E], [F-J], [K-O], [P-T], [U-Z]. These "ranges" represent alphabetical ranges that I would like combo box values to be "filtered" on. The combo box is a listing of counties that occur within the state. If the user hits the option [A-E], I'd like the...
  11. D

    Screening Inputted Values in Control - Runtime Error 94 Invalid Use of Null

    10-4. I've tried all three options and each still requires a double click. I think it has something to do with some other code on the form that I have inserting control values directly into tables using VBA, with one of those controls being the primary key for multiple tables. I'm going to flip...
  12. D

    Screening Inputted Values in Control - Runtime Error 94 Invalid Use of Null

    Okay, that also works, but still requires two clicks of the command button to clear the strXCoordinate value if strYCoordinate is empty. If both of these controls have value, it only takes one click. Is there a way to make it clear the values regardless of whether there is a value in both...
  13. D

    Screening Inputted Values in Control - Runtime Error 94 Invalid Use of Null

    Thanks Paul. I changed my coordinate field type to string since it doesn't really matter for my dbase, which makes the Null options in the if statement a little easier. Now I'm trying to get a simple command button to clear the values in various string controls on the form. Can I simply put...
  14. D

    Screening Inputted Values in Control - Runtime Error 94 Invalid Use of Null

    Programming novice here...but I'm slowly gaining steam. I have a form with two controls on it for the user to enter the geographic coordinates of the location they are at when collecting information in the field. The controls are named "intXCoordinate" and "intYCoordinate". I've tried to get...
  15. D

    Decimal to the proper placing not showing

    Did you ever figure this out? I've got a similar scenario in that I have the formatting for decimals set and an input mask, but the decimal places "disappear" after being entered on a form control. Not sure what is going on.
  16. D

    Make Input Box Value Case Sensitive & Hide Characters That Are Inputted

    I have a command button control hidden on a main form screen that will unhide the Access window, ribbon, and command bars that are set to be hidden on form open (the main form is set to be default on dbase open). My questions are: 1) Can I make the "Passw0rd" case sensitive? It currently works...
  17. D

    Pass Variable to Table Field with VBA

    Okay. Changing visible to no will work fine for me. Particularly since I did not quickly figure out the syntax to make the INSERT INTO do what I want in VBA :) Thanks for all your help.
  18. D

    Pass Variable to Table Field with VBA

    Okay. I think I understand. I believe that is what is happening now. I guess I was just curious if I could drop the field on the form and have the calculated value go straight to the table, without have a field/control on the form. I can cope with having it on the form, just might confuse the...
  19. D

    Pass Variable to Table Field with VBA

    Thanks for the explanation. So is there no way to "pass" the strCalcSurveyID straight to the table without first sending it to a control on the form? I have a control on the form now of course, but I'd prefer it was not there taking up space since the user is not supposed to enter anything. I...
  20. D

    Pass Variable to Table Field with VBA

    Khalid, Thanks. Worked like a charm. I actually had a missing component to the value for strCalcSurveyID. So I've re-posted what worked. Here's and ignorant question for you: What is "Me." in this case? The form? I'm still learning what components are called in VBA. Private Sub...
Back
Top Bottom