Search results

  1. T

    Select date from multiple dates

    Yes there will always be 4 and they're not stored as such, just the result of a bunch of If statements output in text boxes. I was thinking a loop would be effective but I don't know how to use them or code them. The code I'm using is along the lines of: If Me.txtSInsRef = "Strip insulation...
  2. T

    Select date from multiple dates

    I have a form which outputs multiple date values, dependent on previous criteria. Is there a way that I can use a textbox to show the date of whichever of these dates is closest to the present day? i.e. I have 4 due dates (6/30/2012, 6/30/2013, 6/30/2014, 6/30/2015) and I want the text box...
  3. T

    Check box when data entered

    Ok so I managed to get it working by scrappping the check box and instead used the IsDate function, thus saying "If this is a date, add this amount of time on" but what I've found to be a pain is that I can only get it to calculate the date from today's date. How can I get it to take into...
  4. T

    Check box when data entered

    Yeah that's what it's saying and I was going to do it so that if you have a date in the textbox, the checkbox will be "True" or "-1" then a seperate box will check if the box is marked as true and if it is then another command will happen. I need to know what to type just to tell the program...
  5. T

    Check box when data entered

    Thanks for the response but what I was interested in was how to classify the date box. I want to use something that'll say "If this box has anything in it, do this"; would it be something along the lines of anti-null (lack of a better term) And as for the check box being invalid, thanks...
  6. T

    Check box when data entered

    Ok I can't imagine this being hard. I want a checkbox to be "checked" when a date is entered into a textbox, so, "If .. = True, checkbox = True" or such and such What code do I need for this?
  7. T

    Form won't execute unless all criteria is satisfied

    I know that it's a long winded and needlessly complicated way of doing it, but thus far it's working nicely and I understand it so I've stuck at it. The problem with me binding my form to the table is that the control sources of my textboxes are connected to a combo box on my form; That combo...
  8. T

    Add record to table from form

    Well I've changed the ".AddNew" to ".Edit" and now it just edits the current data, which is definitely a plus. The problem I have now is that it will add a blank entry if the user were to go through with the form and add with no data in textboxes. How do I go about setting it so that the...
  9. T

    Add record to table from form

    The same data won't be in two tables. I'd like to add/update data to an existing table. I've just run up a mock table to test out a method that I found on a different forum, but this adds the data to the table regardless of whether or not it is a duplicate. The code I've used is: Private Sub...
  10. T

    Add record to table from form

    I have a form which pulls data from another form and I need to get that data to be added to a seperate table. I have a button which will run this coding, but what is the code that i need to use to do this? I saw a similar thread to this about creating a form from a table but I cannot do that...
  11. T

    Form won't execute unless all criteria is satisfied

    What will be updated in the BeforeUpdate event? Will that have to be done with update code, so that when I, say, click the button you've described, it'll populate a table? Because at the moment i'm setting it to move individual details into a more concise form... so should I set the code in...
  12. T

    Form won't execute unless all criteria is satisfied

    I have a form which somebody will use to populate a table/report, but I want to make sure that all required boxes have data entered before the table/report is populated with the form's info. I was thinking I could use the isNull but I'm not sure where I should put it or how. I have a button...
  13. T

    Form's combo doesn't show correct information

    Well this is a pretty hefty piece of info because of the way I've gone about doing it: SELECT Q_06_AllLines.Plant, Q_06_AllLines.Tag, Q_06_AllLines.[No], Q_06_AllLines.UniqueID, Q_06_AllLines.EquipmentNo, Q_06_AllLines.Service, Q_06_AllLines.ImpulseLineMaterial, Q_06_AllLines.[P&ID No]...
  14. T

    Form's combo doesn't show correct information

    So I have a form which has a combo box linked to another bunch of text boxes. When I select a piece of info from the combo box, the other text boxes are populated with the information from the table regarding the selection. There isn't a problem with the boxes being populated, but whatever...
  15. T

    Using If in AfterUpdate to output text

    I've sorted it; I ran the same If statements in the AfterUpdate section of the combo boxes and it seems to be working fine! Thanks for the help and I'll repost when I'm stuck
  16. T

    Using If in AfterUpdate to output text

    Yeah the textbox is called txtCMatValue, so what I hadn't done was Me.txtCMatValue.Value = 4, but now it works almost like I want it to. The problem I have now is that it will only load up the initial value and hide the box, but when I change the text in the combo box, the box which I want to...
  17. T

    Using If in AfterUpdate to output text

    I added the code to the txtInsValue_AfterUpdate event and to the Form_Current event and it came up with "Compile Error: Method or data member not found" and the code looked like: Private Sub Form_Current() If Me.txtMatValue = 4 Then Me.txtMatAction.Visible = True Else...
  18. T

    Using If in AfterUpdate to output text

    Thanks for all your help, I really appreciate it. I went against your obviously better judgement and used IIf's (and it worked nicely) but just because I couldn't get the switch to work. I'll copy what I wrote and the error it gave me: =Switch([txtMatCalc]>=30, "Repair or change type"...
  19. T

    Using If in AfterUpdate to output text

    Thankyou it worked!! Can I use a similar statement to If-Else as its control source? The calculated value can vary, so I want to say "If lower than one value, output one answer, if lower than another put this answer, else put this answer"
  20. T

    Using If in AfterUpdate to output text

    The value I want to use is displayed in the textbox on the form, so how do I go about using the displayed value in the form as code to be used (if that makes sense) ? I understand the concept of coding but I don't have experience so I'm limited to what I can do
Back
Top Bottom