Recent content by cheekybuddha

  1. cheekybuddha

    text box that look up value from another table than the forms record source

    Hi, Sorry, I've not had a chance to get back here for a while. Did you make any progress?
  2. cheekybuddha

    text box that look up value from another table than the forms record source

    OK, so build on that - change the SQL to: SELECT a.EntryNo, b.SalesNo, a.ProductionNo FROM ( SELECT MIN([Entry No_]) AS EntryNo, [Source ID] AS ProductionNo FROM [dbo_KonfAir DRIFTSReservation Entry] WHERE [Source Type] IN (37, 5406) AND Positive = 1 GROUP BY...
  3. cheekybuddha

    text box that look up value from another table than the forms record source

    So which [Entry No_] do you want to see for this ProductionNo ?
  4. cheekybuddha

    text box that look up value from another table than the forms record source

    I'm flying a bit blind here! However, from your description I think you can try: SELECT a.[Entry No_], b.SalesNo, a.ProductionNo FROM ( SELECT [Entry No_], [Source ID] AS ProductionNo FROM [dbo_KonfAir DRIFTSReservation Entry] WHERE [Source Type] IN (37, 5406) AND...
  5. cheekybuddha

    text box that look up value from another table than the forms record source

    OK, try something like this first: SELECT a.[Entry No_], a.[Item No_], MAX(IIf(a.[Source Type] = 37, a.[Source ID], NULL)) AS SalesNo, MAX(IIf(a.[Source Type] = 5406, a.[Source ID], NULL)) AS ProductionNo FROM [dbo_KonfAir DRIFTSReservation Entry] a WHERE a.[Source Type] IN (37, 5406)...
  6. cheekybuddha

    text box that look up value from another table than the forms record source

    It's not clear what determines which of the two records belong to ProductionOrder and which to SalesOrder. Will [Source Type] = 37 always mean ProductionOrder and [Source Type] = 5406 always mean SalesOrder? If not, what determines which record is which?
  7. cheekybuddha

    text box that look up value from another table than the forms record source

    You must use the square brackets around field names with spaces in. Yes, the SQL as you have it will not give the result you want. Will the [Entry No_]/[Item No_] combinations always come in pairs?
  8. cheekybuddha

    text box that look up value from another table than the forms record source

    Also, have you got field Entry_NO correct? Sometimes you have a trailing underscore, other times not. In the screenshot of the table it contains a space, but not in your SQL Which is correct???
  9. cheekybuddha

    text box that look up value from another table than the forms record source

    Forgot to make the changes in the WHERE clause! SELECT tabA.Entry_NO, tabA.Reservation, tabA.[Source Type] as [Source Type_ProductionOrder], tabB.[Source Type] as [Source Type_SalesOrder], tabA.[Source ID] as [Source ID_ProductionOrder], tabB.[Source ID] as [Source...
  10. cheekybuddha

    text box that look up value from another table than the forms record source

    select tabA.Entry_NO, tabA.Reservation, tabA.[Source Type] as [Source Type_ProductionOrder], tabB.[Source Type] as [Source Type_SalesOrder], tabA.[Source ID] as [Source ID_ProductionOrder], tabB.[Source ID] as [Source ID_SalesOrder" from [dbo_KonfAir DRIFTSReservation Entry]...
  11. cheekybuddha

    Trouble with Ease of Access settings

    Hi, 1. In your VBA editor, go to Tools->Options. 2. In the dialog that appears select the 'Editor Format' tab. 3. In the list 'Code Colors', find the appropriate section and adjust the 'Foreground:' colour in the dropdown. The sections most applicable will be: Comment Text Identifier Text...
  12. cheekybuddha

    text box that look up value from another table than the forms record source

    Sorry, I needed more coffee! :coffee: I was getting confused between which field was text and which field was number! 😲 Of course, antalemnerproduceret is a numeric field in your table (it is [No_] that is the string 😖 ), so the DMax/Max sorting will work correctly.
  13. cheekybuddha

    text box that look up value from another table than the forms record source

    OK, great! Perhaps it works differently in VBA than when used through a query. I only did a quick test in VBA, not using a query expression. What happens if you run query (with the new value antalemnerproduceret = '80'): SELECT [No_], MAX(antalemnerproduceret) AS Test FROM tbl_tidstabel...
  14. cheekybuddha

    disable excel alerts in access vba.

    Did you notice there are two versions of the same function in the second link I posted: However, IIRC from a quick test, the second version also flashed a powershell window :(
  15. cheekybuddha

    disable excel alerts in access vba.

    Did you read the article in the link I posted? All you would do is copy the function PS_OpenItem() in to a new standard module (name the module anything other than 'PS_OpenItem'). Also copy the PS_Execute() function from this post which is linked in the above post. Then replace your three...
Top Bottom