Search results

  1. June7

    Solved Aesthetic boxes on a report

    Okay, instead of VBA, consider this as RecordSource: SELECT tbl_DailyRandoms.ID, Days.D, tbl_DailyRandoms.[1A], tbl_DailyRandoms.[1B] FROM tbl_DailyRandoms RIGHT JOIN (SELECT DateSerial(Year(Date()), Month(Date()), [ID]) AS D FROM tbl_DailyRandomsDummy) AS Days ON tbl_DailyRandoms.D_Date =...
  2. June7

    Solved Aesthetic boxes on a report

    One more, why is there a 0 record in dummy table?
  3. June7

    Solved Aesthetic boxes on a report

    That does add a twist but most anything is doable with enough code. Explain more about tbl_DailyRandoms. Should date be unique? Dates should all be for one month? This table will be purged every month? If so, why are there 1 record for November and 2 for 1/3/2025? Should report always show 32...
  4. June7

    Solved Dlookup Or SetValue not working

    OrderDetailsF RecordSource is unnecessarily complicated. You are binding product combobox to wrong field. Bind this form to OrderDetailsT table and don't include others. Should save ProductID not ProductName. Yes, combobox ControlSource should be ProductID (advise not to use exact same name for...
  5. June7

    Solved Aesthetic boxes on a report

    Yes, use your actual table and field names. You typed SQL statement into RecordSource property? Why don't you build a query object to make sure it builds the desired dataset? Either save that query and then reference its name in RecordSource or copy/paste the working SQL. As always, you can...
  6. June7

    Solved Aesthetic boxes on a report

    Does the link referenced earlier offer guidance to do what you want? No UPDATE query should be needed.
  7. June7

    Hiding a text box and its label when display of the info is unwanted

    Yes, sorry, I misread the OP. Use <> . Those parentheses are entirely optional. Another approach that doesn't require VBA is to use expression in textboxes (will also work in ReportView). Use a textbox as a label. =IIf([ContactTypeID]=25, Null, [some field name]) =IIf([ContactTypeID]=25, Null...
  8. June7

    Hiding a text box and its label when display of the info is unwanted

    I can't get Print & Paint events to do this properly. Also, Paint will error if opened in ReportView, Format does not. Do you have combobox (lookup field) set up in table? Did you drag field from Field List when building report or use wizard to build? This will adopt properties set up in table...
  9. June7

    Hiding a text box and its label when display of the info is unwanted

    Aren't reports always continuous by nature? Sure, can force page break between records but report is still continuous. Can set textbox and associated label not visible in report Format (maybe Print or Paint but I can't get those to work) event for section control is located in. Will not work if...
  10. June7

    Solved If...then or loop help

    Or without array. Dim i As Integer, aisle As Integer For i = 1 To 3 For aisle = 1 To 2 'two aisles Me(Chr(64 + aisle) & i).Enabled = IsDate(Me.txtDate) And (Me.Aisles <= aisle + 1) Next aisle Next i If Not IsDate(Me.txtDate) Then Me.txtDate.SetFocus
  11. June7

    Error "Can't set focus"

    I don't understand calling AfterUpdate event from GotFocus. Comment out that line in cboFamily_GotFocus and the error does not occur. When I first started testing, code was bugging on Me.cboFamily.SetFocus in Load event. Now it is bugging on Me.cboGenus.SetFocus in cboFamily_AfterUpdate unless...
  12. June7

    Solved If...then or loop help

    So what happened to 1 to 40 loop? And with this current loop, fields A3, B1, B3 will never be enabled. Why would you have had to write your code 8 times? Want to provide a current version of your db?
  13. June7

    Make a query of Balance/Outstanding Amount Display only

    And isn't that so in my version (posts 4 and 7)?
  14. June7

    Need Help with Form

    Provide your code. Suggest you just provide database for analysis. Follow instructions at bottom of my post.
  15. June7

    Error "Can't set focus"

    Well, I am not going to build forms to test your code.
  16. June7

    Error "Can't set focus"

    File has only 1 table and no other objects and no code. Possibly need to also provide frontend?
  17. June7

    Error "Can't set focus"

    Possibly because control is not yet available in Load event. Try Open or Current.
  18. June7

    Solved If...then or loop help

    I just edited previous post. Review again. Actually, Not IsNull(Me.2ndField) might not be necessary. Try both, what happens?
  19. June7

    Solved If...then or loop help

    Try: Public Sub EnableControl() Dim i As Integer For i = 1 to 40 Me("A" & i).Enabled = Not IsNull(Me.txtDate) And Not IsNull(Me.2ndField) And i <= Me.2ndField Next End Sub Is this a continuous or datasheet form? Won't work for those. ALL records will show the same setting. This is what...
  20. June7

    Make a query of Balance/Outstanding Amount Display only

    Seems to be more complicated than need be. Any advantage to your structure?
Back
Top Bottom