Search results

  1. A

    Open specific based on return from SQL statement

    You have defined the strSecurityLevel variable as a string - shouldn't it be Integer? If not, and it is a string, then your statements should be: If strSecurityLevel = "4" Then.... I suspect it is a numeric data value though (I would hope so).
  2. A

    Check if field exists

    What is the runtime error it returns?
  3. A

    help with Multi criteria in dcount

    You have an extra Double Quote (") after 'DOH FastFood' I believe that is not required. Remove it and try then.
  4. A

    Data type mismatch in criteria expression - error msg

    Could you post your macro? Or the part of it that is causing the error? Thanks.
  5. A

    Run code on form open based on referring form button

    I would maybe looking at using the OpenArgs propoerty: http://msdn.microsoft.com/en-us/library/aa160845(v=office.10).aspx You can essentially pass through a criteria to the Form and on the OnOpen event of your email form, you could then check the value of the OpenArgs and attach the necessary...
  6. A

    Creating a Delete Query

    This was my thought as well. For something like this, I would have a table set up holding the details of the Sensor (SensorID as PK) and then a second table set up which holds Sensor Value and a Date / Time stamp (Sensor ID as FK, one to many relationship from your Sensor table). Then, for...
  7. A

    Editing Records in table

    Can you not just run two update queries? Query 1: Set the criteria for Field 1 to equal 0 and then update Field 2 to Alternative 1. Query 2: Set the criteria for Field 1 to <> 0, and then update Field 2 to Alternative 2. Unless I'm missing something?
  8. A

    Default to the Default Value

    In you calculation have you tried using the Nz function? This will capture if a text box is empty and if it is, you can set the value to 0 so the calculation still works. For example: Me.txtCalcField = Nz([Me.Text32],0) + Nz([Me.Text33],0) etc.
  9. A

    Generating ID using letters from related tables and sequential numbers

    Rather than trying to calculate the next sequential number from previous values, in situations like this I like to have a separate table which holds the sequential number. So, I might have tbl_Sequential with a number field which holds the sequential number (call it SeqNo for now). This holds...
  10. A

    Save Path Name In Table for editing - Saving & deleting files for email module

    Re: Save Path Name In Table for editing - Saving & deleting files for email module Yes you can. In case you need to be able to store more than one path I would create a table with an ID field (numeric - can be autonumber if you wish) and then a text field to store the path in. Let's say you...
  11. A

    Cascading Lists not working

    Try adding Me.cboWing.Requery at the end of your code.
  12. A

    Creating sequential numbers that change based on field value

    With that code you will be assigning a value to the HFNumber variable, but what code are you using to actually write the data to the table? Or, if you are using a bound form, you need to enter the value of the variable to the text box. So, if you have a text box called HFNumber, you need an...
  13. A

    Creating sequential numbers that change based on field value

    On the form the users use to enter the data, do you use a button for them to click to submit the data to the table? Or is it a bound form and they enter data in which is committed straight away to the table? Personally I would use an unbound form with a submit button so you can verify the data...
  14. A

    how to print like 1 of 10, 2 of 10 in report

    OK, so I think I'm right in saying that the values 1, 2, 3 etc. are what is held in your 'nos of container' field? There may be a better way of doing this but one way is on your form create an unbound text box which will hold the total number of containers (i.e. 5 from your example above)...
  15. A

    need duplicate column

    Could I please ask why? If the data is in there in a column, why do you need a second column showing the exact same information? Perhaps you could explain your requirements a little more?
  16. A

    text field in query

    You can easily just get your query to display a value in a 'column' if required. In your query design view, you could add the following to the next available 'column' in the 'Field' line: FileName: "csv1" This would display csv1 against every record. However, if you need to somehow determine...
  17. A

    User Input Boxes

    Dim x As Variant Dim v As Variant Dim n as Variant n = InputBox("Please enter the Starting Record number") v = InputBox("Please enter the Ending Record number") For i = n To v x = i
  18. A

    Append Query trouble

    Sounds like you are not specifying any criteria in your append query. If you don't have any criteria (the equivalent of the WHERE statement in SQL) then it will do all records. You need to add criteria to specify which Student should be appended. However, if you are entering information into...
  19. A

    Count in an Unbound Textbox

    Use DCount and count a particular field in the table: Me.MyTextBoxName = DCount("FieldName","tblName")
  20. A

    Entering text into a textbox with if statment.

    OK, in your query, add a new Field: BonusDue: IIF([LoyaltyBonus]>=500,"Loyalty Bonus Due","") Then set Textbox53 to have BonusDue as its Control Source.
Back
Top Bottom