Search results

  1. C

    If user inputs any information, then save and close, otherwise just close

    Sorry, I'm not sure I understand the question. I want to it to check whether the user input data into any field, not just one in particular.
  2. C

    #Error

    I have a main user input form ("CALS v2" in the attached copy). Within that form is a command button that opens up the current record in a secondary form ("HelplineReferralTracking"). Once the user inputs what they need in Helplinereferraltracking, they click the save and close button and it...
  3. C

    If user inputs any information, then save and close, otherwise just close

    I have a command button that closes the user input form and returns back to the navigation form. My current code is as follows: If IsNewRecord = "Yes" Then AssessmentEndTime.Value = Time IsNewRecord = "No" DoCmd.RunCommand acCmdSaveRecord Else End If If MsgBox("Would you like to save and close...
  4. C

    Changing names

    If I change the name of 1) field name or 2) table/form/query name will the change be made in all downstream locations including VBA and SQL coding?
  5. C

    Requery and return to current record

    Thanks this ended up working
  6. C

    Requery and return to current record

    That didnt work either :( It's really strange what's happening though. It's not even going to another record number. I.e., it still says record 19 of 19, but the data that displayed is different.
  7. C

    Requery and return to current record

    It's only when you add a new record that I'm seeing the issue. You add the new record, enter the first field (Assessor), go to the last name, enter the last name, hit tab and it changes the record.
  8. C

    Set query criteria when opening the query's form

    Started working on this, but am now realizing my case is a little more complicated. I have several fields in play. To give some context, I want to make a single form for all departments to use. When the user opens the first form, it asks them which department they're with. When they select the...
  9. C

    Set query criteria when opening the query's form

    I have a query that I'm displaying (in datasheet view) in a form. I want to set the criteria of the query based on input from the user. Basically, the user will select their program and the form will open to the query filtered to only entries for that program. I found the below article, but...
  10. C

    Requery and return to current record

    Are you saying the way I'm using fundamentally won't work? Or is there something that needs to be adjusted? I'm trying to avoid redoing the entire thing for a new method.
  11. C

    Requery and return to current record

    I'm having trouble firing the requery command and returning to the current record instead of reverting back to record 1. I picked this up from someone else: Dim Curr_Rec Curr_Rec = Me.CurrentRecord DoCmd.Echo False Me.Requery DoCmd.GoToRecord , , acGoTo, Curr_Rec DoCmd.Echo True...
  12. C

    'And' and 'Or' in the same if statement

    Hello, I'm trying to accomplish the following in VBA: If condition1 = X AND (condition2 = Y OR condition3 = Y) THEN .......... Ex: If [Eligible_PROSPollock] = "Eligible" And [Interested_PROSPollock] <> "Yes" Or "No" Then However, I keep getting a type mismatch error
  13. C

    Navigate to record based on multiple fields

    Thank you!
  14. C

    Navigate to record based on multiple fields

    I'm building an assessment tool and would like the end-user to search for the client before proceeding with the assessment to see if the client has already been assessed. The client should be searched by last name and DOB or last, DOB, and first. If the client exists, the form navigates to the...
  15. C

    Make field in a form active or inactive based on the value of a calculated field

    I have a query that is calculating a client's eligibility for services. This field's output is either Yes or No depending on data from a series of other fields (automatically calculated). On my form, I would like the "Interested" field to be active only when Eligibility is Yes. Something around...
  16. C

    Look up Date by matching column number

    Hello, I have two spreadsheets, and I need to pull patients' visit dates from the second sheet based on the visit number in the first sheet. I've attached an example file and a screenshot below since it's hard to explain. Essentially, in Sheet 1, I have the variables ID, Visit#, and...
  17. C

    Keypress event in subform

    Genius!! This all works perfectly. Thank you so much! I'll try to pick apart the code myself to get a better understanding of the moving parts. Thanks again!
  18. C

    Keypress event in subform

    Can you provide an example? I don't fully understand.
  19. C

    Keypress event in subform

    Well..I think I've managed a workaround, but now I'm having trouble setting the focus back to the field in the subform. Me![SubformName].Form![FieldName].SetFocus What do I have wrong here?
  20. C

    Keypress event in subform

    Couldn't get this to work with the KeyPress event so I changed it to run the On Click event of the forward and back command buttons I have, but it's still not working. Now I'm getting a "cant go to specified record" error. The error with the KeyPress attempt was "application-defined or...
Back
Top Bottom