Recent content by mattstrachan

  1. M

    Reformat a Field to match external data

    Good Morning Bill, I am still working on this code issue you have been so helpful with. I am now trying to take the calculated field from my form, for the ProductID with the leading 2, ex. 2000976, and put that data onto a label (Report). I am currently at a loss as to how to make this happen...
  2. M

    DoCmd.OpenReport type Mismatch Expression

    It turned out to be in the Query that was behind the Report. Thank you for your help though!
  3. M

    DoCmd.OpenReport type Mismatch Expression

    I have been using the syntax: DoCmd.OpenReport "Label_Single", acViewPreview, , strWhere This has worked for the last month. Suddenly I am getting an error 3615 Type Mismatch in expression. I have not changed anything in this code for over a month. Here is the full code: Private Sub...
  4. M

    Query Data on a Report

    I apologize, I was just completely missing something this morning. I just neeeded to use the DLookUp with the Query as the domain.
  5. M

    Query Data on a Report

    I am having trouble getting data to appear on my Report. The report is based of a Query, qryLabel. When I run qryLabel the correct data is displayed but when I try to use this data on the Report, I get an #Error or #Type. Here are the methods I have tried so far to get the data on my Report...
  6. M

    Reformat a Field to match external data

    Ok, great so now you have allowed me to get that line of code to work. Now I have a "item not found in this collection" error on the line: Me.txtTablePercent2 = Rst!Fields!TablePercent Rst!Fields!TablePercent is not found in the collection. I simply removed the Fields! from the code and now...
  7. M

    Reformat a Field to match external data

    I can post my db here if that may help show what is going on. There are links to external databases though that I am not sure will show up and most of the data is being pulled from them. Here is my full code for the problem I am working: Private Sub Form_Current() Dim ProductIDStone2 As...
  8. M

    Reformat a Field to match external data

    So I have read a few articles that describe this error and why it occurs. The articles say that ADO has a higher priority that DAO. It says to make sure that the DAO has a higher priority in the REFERENCES dialog box. I have looked but I do not know where this is. Could this be a solution?
  9. M

    Reformat a Field to match external data

    I am getting a Data type mismatch in criteria for: Set Rst = CurrentDb.OpenRecordset(MySql, dbOpenSnapshot) Could this be coming from MySql? The error occurs after my select statement but I know that StoneName is Number and ProductIDStone2 is String. But this next line of code works just fine...
  10. M

    Reformat a Field to match external data

    I think you are following me. So could I do something like this: txtTablePercent = Docmd.RunSQL( ) I am trying to make that text field equal the Select Statement that you typed above. I am not familiar with running SQL inside of VBA. Would that be a correct method of making a field equal a...
  11. M

    Reformat a Field to match external data

    Ok, So now I have my ProductID conversion taken care of. Now I would like to populate the form for 5 fields. Length, Width, Height, Weight, and another field that is called TablePercent. I have the form working for the first four fields. The last field is a calculated field that is pulling more...
  12. M

    Reformat a Field to match external data

    Well that worked for me. I am now getting the correct ProductID to pass through. Thank you for all of your help today!
  13. M

    Reformat a Field to match external data

    Is there a reason the a 7 digit Autonumber field would not be able to be converted to a String? The reason I ask is because if I put in this code: CStr(Me.ProductID) My MsgBox still shows 967 instead of 0000967. Does this mean that the ProductID is actually being passed in as just 967? The...
  14. M

    Reformat a Field to match external data

    The ProductID field is an AutoNumber set to Long Int, Increment, and the Format is "0000000". I will attach a copy as soon as I can if it will help.
  15. M

    Reformat a Field to match external data

    MsgBox (2 & Right(CStr(Forms!Product!ProductID), 6)) Still getting: 2967 instead of 2000967 I thought I would break the part I want to format away from everything else for the time being. Once I can make the code above result the correct format i will dump it back into my DLookUp. Any more...
Back
Top Bottom