Search results

  1. J

    Forcing user to enter data into certain fields

    Hi CJ, What should I add to your code to get the labels (box and labels) under Character_of_Chest_Pain to disappear and then appear only if Chest_Pain="Yes"? I have a lot more conditions to set so I'm thinking the code is going to get complicated. For the imaging test tab, I want CTAlocation...
  2. J

    Forcing user to enter data into certain fields

    Hi CJ, Here is my code for the "No" and "N/A" values: Private Sub SetControl(ThisCtrl As Control, LastCtrl As Control) Debug.Print ThisCtrl.Name ThisCtrl.Visible = Replace(Nz(LastCtrl.Value, "N/A"), "N/A", "No") <> "No" If ThisCtrl.Visible = False Then ThisCtrl.Value = Null...
  3. J

    Forcing user to enter data into certain fields

    Hi CJ, I think I'm in over my head trying to learn and manage your code. I think I should really go back to what I had before and try to fix that. That way I will know exactly what I'm doing. Plus, after trying your code again some of the fields didn't appear show up correctly. For example...
  4. J

    Forcing user to enter data into certain fields

    Hi CJ, I tried doing similar thing for Symptoms tab but not working. For this tab I just want field Character_of_Chest_Pain to appear when Chest_Pain=Yes, but Character_of_Chest_Pain stays hidden. First I set tags for Chest_Pain and Character_of_Chest_Pain to CheckifCompleted in property...
  5. J

    Forcing user to enter data into certain fields

    Hi CJ, For SetControl Sub, how do I set conditions for fields on the other tabs? I mean I can't just write ThisCtrl.visible=[condition] since the comorbidities tab will also be affected by this. The other fields do not have values of "N/A" so I can't just add the SetControls for the other...
  6. J

    Forcing user to enter data into certain fields

    Hi CJ, Wow. Thank you for taking time out of your day to look over this. You are truly awesome. Now I really have some work ahead of me :) This might take me some time to digest so here's a few questions regarding what you wrote: ThisCtrl.Visible = Nz(LastCtrl.Value, "N/A") <> "N/A" I'm...
  7. J

    Forcing user to enter data into certain fields

    Hi CJ, I think my db form/table layout and structure is just about set. I only have one table associated with it and everything is test data. There's just a couple things I would like to fix. 1) Force the users to enter data into all visible fields. 2) Fix any errors that arises. I've...
  8. J

    Forcing user to enter data into certain fields

    Hi CJ, Can I send you my db? I have a form with multiple tabs with multiple fields on each tab. I want to hide certain labels and their fields depending on values of another field. For example, PCI and CABG is a type of revascularization technique. I have a field for revascularization with...
  9. J

    Forcing user to enter data into certain fields

    Hi CJ, Sorry, I'm not really getting it. I think this example may be too advanced for me. I've just been using Access for the last 3 weeks. Any chance you can tell me what's wrong with my original code? Still getting an error with this: Private Sub Form_BeforeUpdate(Cancel As Integer) Dim...
  10. J

    Forcing user to enter data into certain fields

    Hi CJ, Is this the correct way to use your code for the field CTAlocation? Private Sub Form_BeforeUpdate(Cancel As Integer) Dim CTALocation As Control warningLabel.Caption = "Some required fields are still empty." On Error Resume Next 'labels do not have a value property If...
  11. J

    Forcing user to enter data into certain fields

    Hi Bob, I tried placing the if then msgbox statements in the form's before update event. But it doesn't seem to do anything after I click on the Add New Record button (which I created using the form's macro wizard for adding a new record) if there are still missing values in some fields. In...
  12. J

    Forcing user to enter data into certain fields

    Hi All, I have a form with various tabs and a number of fields. If I could I would just select all fields to "required=Yes" in the table design mode. But some fields should only have data entered if another field has a certain value. So, I think I just want all visible fields for this data...
  13. J

    Allowing different values in one field depending on the selected values of another

    Thank you JHB!! I now see the values under each field! If I have a different question should I post under a different thread? Jim
  14. J

    Allowing different values in one field depending on the selected values of another

    Hi Mihail, I've uploaded my access program. I am using Access 2013 but converted it to 2002-2003 format. There's definitely some bugs in the program but it's almost a working prototype. The Row Source problem is on the "Prior Tests" tab in the first form. The VBA code is placed in the Test1...
  15. J

    Allowing different values in one field depending on the selected values of another

    Hi Mihail, I'm not sure I understand completely. But everytime I write code for each field I add [event procedure] and click on code builder. The control source for each field is basically the field where the user enters or selects values, so this would already be set? I can change the...
  16. J

    Allowing different values in one field depending on the selected values of another

    Hi Mihail, I ran your code w/o the Stop and Exit Subs, but I still don't see any values under the results field after I select a value for Test1. I don't have any OnError statements in the code. I'm wondering whether the field's structure defined in table design as anything to do w/ the...
  17. J

    Allowing different values in one field depending on the selected values of another

    Hi Mihail, Yes. The code stopped at the very first Stop. Does this mean there's no error? I should also mention that I have a bunch of variables set to missing within each If statement. I didn't think it would affect the code so I took it out for easier reading. Thanks, Jim
  18. J

    Allowing different values in one field depending on the selected values of another

    Hi Mihail, After running your code and pressing CTRL+G, I get me.test1=Stress Echo. This is the first value in the list I placed in the row source in table design mode. I checked the case and it seems to match. Not sure if this is a problem? David: You're right. I've been having to type...
  19. J

    Allowing different values in one field depending on the selected values of another

    Hi All, I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list. After doing a thorough search on this topic I came up with using the .rowsource keyword. My syntax...
  20. J

    Help with button events

    Hi. So I am completely new to Access. Just started using Access this week. So far I have a table and I have created a form from the table. I've also created some buttons but am now stuck on how to make the buttons do what I want. For example, I have 2 buttons named "Yes" and "No". When the...
Back
Top Bottom