Search results

  1. S

    How to pull one max date from the value in four different text boxes on cont. subform

    Hi Jeff, I can think of 2 ways to do that. One is just to make Textbox null. If this is good enough, it is simple: you just edit the IIF statement. =IIF([NewTextBox]<>"xxx", "", <the original IIF statement here>) The second way is to use the Conditional Formatting.It works this way: if the...
  2. S

    mainform opens subform in add mode, but one field is already filled

    Hmm.. I am somewhat lost. In my example, Form 2 is not a sub form. It is a pop-up form. When you finish Form 2, you close it. Now you are back to Form 1. Then you click "Add" button and the same thing will happen. Anyway, why don't you test my example first?
  3. S

    How to pull one max date from the value in four different text boxes on cont. subform

    Hi Jeff, Oh, I assumed that all the other email dates are in before "Broadcast" is entered. If Broadcast has a date while all or any others are empty, you can easily amend the IIF statement. But if any email date fields may be empty without any order, it is a bit messy. How about checking the...
  4. S

    Creating Multiple Records using button and text box to say how many to create

    Symon, I presume that you have the form open with the existing record. The following codes may cause a problem if you are looking at a new record with all the data in but not saved yet. Doing something like this on the form which also opens the same table is notrecommended. I have not tested...
  5. S

    How to pull one max date from the value in four different text boxes on cont. subform

    Hi Jeff, Here are my 2 cents. Your question would have been easy: the codes would have looked like If Nz(Me.subform!Email1) = "" Then TextBox = "Not chased yet" Else If Nz(Me.subform!Email2) = "" Then TextBox = "Last Chased: " & Me.subform!Email1 Else If Nz(Me.subform!Email3)...
  6. S

    Help Needed Please

    Use "#" instead of "'" for dates. So, it should be: Task = "Select * from qry_Reports where ([ReferralDate] >= #" & [txtStartDate] & "#) or ([ReferralDate] <= #" & [txtEndDate] & "#)"
  7. S

    mainform opens subform in add mode, but one field is already filled

    Hutchy, I am not sure if I understand your situation, but I will give you my answer to your Option 2. The scenario, as I understand it, goes like: On the main form, you have a button "Add" and when you click on that, a new form will pop up with a new record except that the two fields are...
  8. S

    Form's control with iif statment to show specific records

    That is correct.
  9. S

    Form's control with iif statment to show specific records

    No problems. You can set the filter at the form, keeping the query intact. 1. Open the property sheet of the form and choose "Data" tab. 2. At "Filter", enter [checkbox 1]= True 3. Turn "Filter On Lord" to Yes. That's all.
  10. S

    Rowsource query error

    Oops. You already got it. Sorry for redundancy.
  11. S

    Rowsource query error

    Hello mafhobb, You can write this code at the form's Load Event. Me!listbox.Rowsource = "SELECT [ID], [Doc], [Device] " & _ "FROM tblPrinterSelection " & _ "WHERE Computer='" & Environ("computername") & "';" Be careful about the positions of double and single quotation...
  12. S

    Change Background Color Double Click Event

    I am back, but crba724 may have gone. I have an answer and am posting it anyway in case someone else might be interested. You will have to add another field on the table that is the source of the continuous form. Since it seems to function as a flag, let's add a Yes/No field and call it...
  13. S

    Change Background Color Double Click Event

    crba724, I didn't read your post carefully enough. My answer will change the color of the entire row, not a particular field. But all the clues you need are included in my answer. Unfortunately I have to go now. So, good luck and if you still have problems, I will get back to the issue later...
  14. S

    Change Background Color Double Click Event

    Hello, If you want to change the background color of the record that is on focus, it is not that simple. You will use the conditional formatting to do this. To simplify the operation, I changed your scenario a little bit. The user does not have the control of on/off for the background color...
  15. S

    Form's control with iif statment to show specific records

    Andrew, You should apply a filter to the query you are using for the form's record source, not to a field on the form. Open the form in Design View and open the Property Sheet, and then either edit directly the query and add a filter there or enter [checkbox1] = True in "Filter" box. Shoji
  16. S

    How to move the data from a table to another

    Hi pikkhuanloy, If your boss does not want to use my codes, that's fine, but did you understand what goes on with my codes? If you did, you can apply them to other variations of codes. The situations you described seem to be pretty chaotic. The import format is not standardized, and you should...
  17. S

    Putting Text Into Combo Box

    If the SELECT statement for the combo is SELECT tblX.Field1 FROM tblX you can modify it as SELECT 'label caption' & tblX.Field1 FROM tblX where 'label caption' is whatever you want to enter.
  18. S

    Message box if we never change the textbox value...

    You talk about "rows". I am not sure how your form looks like, but you can pop up a warning when the user finishes the 7th "row" by AfterUpdate event. Create an AfterUpdate event for the 7th field (row) like Private Sub Field7_AfterUpdate() MsgBox "Please ...." End Sub
  19. S

    Message box if we never change the textbox value...

    At the Submit_Click event procedure, you can add If Nz(Me!CardNumber) = "" Then MsgBox = "Please enter the Card Number." Me!CardNumber.SetFocus Exit Sub End If ... What this code does is 1. Check if CardNumber field is empty or not. 2. If empty, show...
  20. S

    Continuous Form in Tabs

    If you want to show all the members of each class in the tab style, you have to use either a sub form (continuous) or a listbox in each tab. A listbox is much easier, but if you want to use a continuous sub form, you create just one form and use it on each tab, and set up Master-Child Link on...
Back
Top Bottom