Search results

  1. Auntiejack56

    Subform to display records based on form combobox

    Leo, is your combobox populated from a table containing all the areas and codes, or have you hardcoded them in as 18 values?
  2. Auntiejack56

    "No current record" error now affecting all versions of my database

    Well, there you go, I've learnt something new, I never thought Me.Recordset.MoveLast was a thing. In the dark ages, I learned that you shouldn't (in fact, couldn't) use the Me.Recordset object to navigate a form, you had to use something like Dim rs As DAO.Recordset Set rs =...
  3. Auntiejack56

    "No current record" error now affecting all versions of my database

    If there is a corruption, one way to find it is to create a new blank database and import all the tables from the old one, then the queries, then the tables etc. Sometimes the corrupted object can be identified because it won't import. Other times, the import fixes the problem.
  4. Auntiejack56

    "No current record" error now affecting all versions of my database

    sorry if I'm missing some relevant info from above, but you note you are clicking button on a quote record in a subform. If you click first on a field in the quote record, and then subsequently click the open button, is the behaviour different? I'm thinking about where the focus is at the time...
  5. Auntiejack56

    "No current record" error now affecting all versions of my database

    Are you getting any records at all, or just occasional 'No current record' messages? In case the problem is the linkage, try deleting all your table links, then importing the tables into your front end. If that solves the problem, then you'll need to check whether there is a relinking function...
  6. Auntiejack56

    Empty Listbox shows listcount = 1

    Well, I'm pretty sure that the experienced Access users here would always have a valid SQL string in the rowsource - it would never be a zls. That's why there is so much chitchat in here about why the listcount is 1 when rowsource is zls - most have not encountered the situation. Instead, they...
  7. Auntiejack56

    Empty Listbox shows listcount = 1

    All good, but if I understand you correctly From what you've described, when the user enters the task, the goal list is empty (lst_Goals.rowsource = ""), and when the user enters the first goal, then you would have to enter an actual rowsource (lst_Goals.rowsource = "SELECT GoalName from GOALS...
  8. Auntiejack56

    Empty Listbox shows listcount = 1

    Looks to me (but what would I know) that if you set the rowsource to an empty string, Access cannot process that as though it was a SQL statement which returns no records (because it isn't). Instead, it 'returns' a null and puts that in the listbox, which actually makes more sense, but...
  9. Auntiejack56

    Solved loop without do

    I love the way the DBGuy's compiler gives a satisfied "ah" every time it encounters an understandable piece of code. I hope my compiler is enjoying itself even half as much.
  10. Auntiejack56

    Update Query for Revision Number

    For your information, the whole solution suggested by the good people above will look like this: myFormID = Forms!JobQuote!JobID NewRevNo = Nz(DMax("RevisionNum", "tblQuoteDetails", "JobID = " & myFormID),0) + 1 strSQL = "UPDATE tblQuoteDetails AS t SET t.RevisionNum = " & NewRevNo & " WHERE...
  11. Auntiejack56

    SQL in an Access module public sub

    Assuming tables are essentially as shown: Then SQL is this UPDATE TableA INNER JOIN TableB ON TableA.PartNo = TableB.PartNo SET TableA.IncorrectValue = [CorrectValue]; That will correct your errors. Jack
  12. Auntiejack56

    Various labels on form become bold when click command button - no code entered to make them bold

    Looks like you are highlighting errors on the form by setting the label on the error field to red and bold, n'est-ce pas? So I suspect that when you click the button, the Lostfocus or Exit event is firing for the BatchNo field, and that is where the error is occurring. Your command button code...
  13. Auntiejack56

    Access to Sql Server Question 2

    There is a method for resolving this here: https://www.bluebridge.com.au/KnowledgeBaseMenu.html There are multiple steps involved in setting it up, but it works for any number of different combos in your db that use an Access multi-select. There is a sample db to download that has all the...
  14. Auntiejack56

    Insert a blank row in Excel after Access export to Excel

    Heya Ben, This is a bit of fun, isn't it? You obviously have your own code working, and I'm going to assume that the query that you use to export all the data is 'qryMyExportQuery', and that the date in the query is 'myDate'. So you could shoehorn something like this into it - I haven't tested...
  15. Auntiejack56

    Controls to Sort Continuous Form Records with an Integer Priority Field

    No it doesn't solve multi-user issues. And note carefully what Pat said, that you have to make sure that the subform records are saved before you do an update, no matter where you site the update code. I prefer to separate the updates by providing a separate form to resequence, and my...
  16. Auntiejack56

    Solved Update field and Validation criteria

    Wild Suggestion: Take the update statement out of the form, and put into the caller routine. Let's say the form is bound to the table tblKolone1. The calling code would look something like this aircode: myStatus = dlookup("StatusKoloneStanje","tblKolone1",,,"ID = " & myID) docmd.Openform...
  17. Auntiejack56

    Controls to Sort Continuous Form Records with an Integer Priority Field

    Another aspect is that when doing this on a subform, you are likely to have unsaved changes on a subform record when doing the promote. This will give you an error ("Another user is changing this record"). You may have noticed that other packaged software doesn't usually do it your way - they...
  18. Auntiejack56

    Why is this form dirty?

    Might be worth mentioning to the OP that the dirty event doesn't fire unless you physically type something (https://docs.microsoft.com/en-us/office/vba/api/access.form.dirty(even)):
  19. Auntiejack56

    Controls to Sort Continuous Form Records with an Integer Priority Field

    I agree with June7, although the fact that users require their records in a particular order can mean that they have effective control over that set of records anyway. Where I have used this technique, it was for the admin user, so no risk of conflict. Use the following at your peril. I know you...
  20. Auntiejack56

    Why is using GoTo considered bad practice?

    I avoid gotos because they don't correspond to a way of seeing a logical solution to a problem. I'd hope that other folk would read my code and follow the train of thought from top to bottom in each routine. Not jump around like a jack-in-a-box. I must admit, though, that validating screen data...
Back
Top Bottom