Search results

  1. MajP

    Solved OpenArgs From SubF.CurrentRecord[FieldName]

    If I remember correctly at one time you could not reference a field that was not bound. Then for years you could. Now you cannot again. I guess they like teasing us.
  2. MajP

    Suppress debugging or runtime errors prompts.

    I am assuming that is an unhandled runtime error. If it is locking up on a handled error then not sure there is a solution. But if you want to log errors there are plenty of examples out there of creating an error log and writing to a file or table. Is that what you are asking...
  3. MajP

    Solved Why Some Calculated Fields Will Not Work In A Query?

    I should have said that the Where comes before the select, which should explain the Where. Not sure the reason for the sort, but it is the same and you cannot use the alias in the sort. In either case you get a Parameter Prompt because it does not know about the alias when that occurs So you...
  4. MajP

    Solved How to create new record from filtered record

    And the provided solution did not do that? How do you expect query2 to know the new foreign key????? That is what all the provided solutions do. Explain why you cannot use the provided solution? I am baffled.
  5. MajP

    Solved Why Some Calculated Fields Will Not Work In A Query?

    That is not true. As long as the OP drops query1 from the sql it works. In this case there is no reason to duplicate the alias field. SELECT length, width, depth, length * width AS AREA, area * depth AS VOLUME FROM table1; Now if you want to sort or filter on...
  6. MajP

    Solved How to create new record from filtered record

    Because your solution does not insert the foreign key, but all the provided solutions do?
  7. MajP

    Select Statement Problem

    Why not just try that code and post the sql string from the debug if it does not work?
  8. MajP

    Select Statement Problem

    I doubt that is even close for several reasons. I am pretty sure you cannot use Column in a sql and becuase this is in code you have to properly format the date. dim strSql as string strSql = "SELECT * FROM [InvoicePayments] WHERE PaymentDate = #" & Format(Me.UnallocatedReceipts.Column(3)...
  9. MajP

    Solved OpenArgs From SubF.CurrentRecord[FieldName]

    So this might be problematic for me because what I have been doing is adding the control temporarily to save the form. Then opening the form and getting rid of it. I just feel it is cleaner not having a hidden control for the purpose of referencing the field. I am wondering now if the user...
  10. MajP

    Can't get Dlookup to work

    My guess is you want it to be case sensitive. This is not. You can try setting the form to Option Binary, but I usually build a case sensitive function Public Function UserFound(UserName As String, Password As String) As Boolean Dim rs As DAO.Recordset Dim criteria As String Dim Msg As...
  11. MajP

    Solved How to create new record from filtered record

    I say it is more than simply reasonable, it is the only way this could have a chance of making sense.. There is no way this could be useable without the way to relate the records. It would be completely meaningless.
  12. MajP

    Solved How to create new record from filtered record

    Taking my suggestion add the following ![Customer Name] = Me.[Customer_Name] !City = Me.City !InvoiceDate = Me.InvoiceDate !ParentInvoice = Me.InvoiceID !RecordType = "Rollback" .Update Now your main form recordsource should include...
  13. MajP

    Solved How to create new record from filtered record

    Again, I doubt what you want to do makes sense as described. But at a minimum if I was doing what you suggest and making a copy I need to know that the newly created record is related to the original record and probably need some field to say what type of record it is. So if I create a...
  14. MajP

    Solved How to create new record from filtered record

    I am clueless of what you want to do, but I am pretty sure it makes no sense. Are you saying you want to duplicate the Invoice and duplicate the related child records. Jones Supermarket (duplicate)? This does not make sense, but to do that. 1. I would do a "Select Into " into...
  15. MajP

    by reference

    That is a very strange argument to say it "might cause a problem" if you incorrectly assume something would work a certain way and it does not work in the incorrect way. It never occurred to me that someone would assume that passing an object by val would create a Deep Clone / Copy of the...
  16. MajP

    Solved How to create new record from filtered record

    No, you definitely can add to the recordsetclone. It is connected to the underlying table. But you cannot do something like this where you read each record and create a modified version of it. This will cause an infinite loop Do while not RS.EOF RS.addnew 'Add a record, but it goes at...
  17. MajP

    Solved How to create new record from filtered record

    You cannot loop a recordset forward and add to it at the same time in each loop using a "While Not Records.EOF" construct. Since each time you iterate you are adding a record to the end of the file and thus never get to end of file. Creating an infinite loop. Although I have never done it, I...
  18. MajP

    Tantrum time ...Run time error91

    Does not mean you can not use the code tags above </> to post your code and have it cleaned up and properly indented.
  19. MajP

    Tantrum time ...Run time error91

    What is the issue with formatting the code? No one want to read that garbage. You are wasting peoples time. Properly format it if you want people to look at it.
  20. MajP

    Tantrum time ...Run time error91

    It is not "Playing up". Code does not stop working. Obviously conditions have changed with the folder or mail items and your critieria is no longer met.
Back
Top Bottom