Search results

  1. M

    Subform not updating correctly

    Thanks for your help Uncle Gizmo, please find reuploaded. At present there are only two forms, two queries, and three tables, I can't cut it down any further. The main form uses a recordsource from a query: SELECT TOP 10 Questions.QuestionID, Questions.Question FROM Questions WHERE...
  2. M

    Subform not updating correctly

    Morning all, I have been having issues with a subform on the attached database - for some reason it is not always updating to show corresponding records. To give an idea of what I am planning, this is effectively going to be an interactive learning portal which can test users as well. There...
  3. M

    IF Function within a Form

    Hi Dave and John, I have taken both of your advice and not only got it all working, but also improved the nomenclature of the various objects, so thank you both for your help and speedy responses! Much appreciated as always, Dan
  4. M

    IF Function within a Form

    Hi Guys, Just a quick query which I hope is going to be fairly straightforward. I have a form in which users enter a few fields, one being DebtGenerated(£) and the other being DebtCollected(£). What I am trying to do is add an AfterUpdate section of code which, once the DebtCollected(£) is...
  5. M

    Query-Join help needed

    Hi JHB, I have just realised I've been a bit of an idiot and there was nothing wrong with my query or code at all, it was just to do with a lookup in the table going to the wrong column. Sorry for the confusion, but thanks for all of your time and effort, it is much appreciated! Dan
  6. M

    Query-Join help needed

    Here is the initial query and count of records, along with the table of departments. The DeptName in the query is giving the ID from the Department table, and I am hoping to join it using SQL to show the department names for the purposes of reporting. Thanks again for the help, as always I can...
  7. M

    Query-Join help needed

    Hi again, Thanks for the reply, I have tried to implement this but instead of producing a table with the number of adjustments per department, the above code just produced a list of all of the departments but didn't consider the number of records from tblAdjustments at all. My original query...
  8. M

    Query-Join help needed

    Good morning, I have a query I plan to base a report on, and am having trouble with something which seems as though it should be quite basic, but as I'm new to this I am struggling. Essentially I want to produce a query which looks at a table and says how many records came from each...
  9. M

    Disabling additions in a form

    Ok I have done that and got absolutely everything working without a hitch! Now all I need to do is spend 30 minutes testing it before handing it to the person I was creating it for! Thanks again for all of your help Paul, on this and my previous query. I couldn't have done it without you!
  10. M

    Disabling additions in a form

    Essentially the form is based on a query which applies the filter. The SQL code for this is: SELECT tblAdjustments.ID FROM tblAdjustments WHERE (((tblAdjustments.PolicyNumber)=[Enter Policy Number])); That way when you click the button to search, you are prompted to enter the policy number...
  11. M

    Disabling additions in a form

    Hi Paul, thanks again for being on hand. I have tried this and wasn't sure whether to set this up based on the query or the table as the form is based on a query. I have tried both, neither of which proved successful. For the table I have the following code: Private Sub...
  12. M

    Disabling additions in a form

    Hi Guys, I have a form which acts as a search function for users looking to amend existing records. This is based on a query, where users enter a parameter (PolicyNumber) and this returns only the records which match the PolicyNumber in a form view. I have also added basic navigation buttons...
  13. M

    Conditional mandatory fields

    You, good sir, are a star. That has worked perfectly and I have had it implemented across various buttons throughout my database now. Thanks again, and thank you for your patience, it is really appreciated!
  14. M

    Conditional mandatory fields

    I have converted the buttons from Macros to VBA, the code for my button now is: Private Sub Command27_Click() DoCmd.GoToRecord , "", acNewRec End Sub Having done this I obviously get a different error message, Run-time error '2105': You can't go to the specified record. What I am trying...
  15. M

    Conditional mandatory fields

    There is no code at present, I just have an embedded macro. I know I ought to use code but I am very inexperienced in Access at the moment and the simpler I can keep things the better. Should I change this to code? I know it is probably a case of one being the easy way and one being the right...
  16. M

    Conditional mandatory fields

    The 'New Record' button is custom-made, but all it does is navigate to a new record so nothing complex. What I meant was once it has been established that the 'Comments' box is mandatory and that the user hasn't entered anything in, when they try to navigate away can it deliver only the...
  17. M

    Conditional mandatory fields

    Aha! That is fantastic, as you said I had them as numbers so that is absolutely great. Thank you both for your help. One final related point, when I click the 'New Record' button it displays the correct message, but once I click past that it comes up with a couple of prompts, firstly one...
  18. M

    Conditional mandatory fields

    Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.SecondaryReasonForAdjustment = "Other (Detail in Memo)" Then If Len(Me.Comments & vbNullString) = 0 Then MsgBox "You must add a memo as you selected 'Other' for Secondary Reason" Cancel = True Me.Comments.SetFocus End If...
  19. M

    Conditional mandatory fields

    Hi Paul, Thanks for your response, I attempted to use this code (tailored to my database) and unfortunately didn't have any luck. I checked out a previous thread where you helped somebody with the same issue but I am still struggling. I don't come across any errors, it simply doesn't make the...
  20. M

    Conditional mandatory fields

    Hi all! First and foremost, hi, I am new here but have been having trouble with an issue and was unable to find a solution that I was able to get to work. Basically I have a form which records primary and secondary reasons for people writing off money, and in the secondary reasons I have an...
Top Bottom