Search results

  1. Solo712

    Nz or IsNull Functions

    Hi Pat, generally you would want to check if the passed WHERE argument is null or empty before you send it for execution to a report. You could simply protect against the Null argument by "EmpID='" & Nz(Me.cboFName.Value) & "'" and then in the report check if you have a "No Data"...
  2. Solo712

    Changing control value on subform from main form control

    Have you triedMe.frmServiceContinuity.Form.chkContinueYes.Value = True? Best, Jiri
  3. Solo712

    Extract partial field name to refer to another field

    You could put the buttons inside a frame on the form (eg "frClickedDate") and then extract the value of the selected one in the frame's Click event simply as SelectedDate = "d" & Cstr(frClickedDate) How to set up a frame : https://msdn.microsoft.com/en-us/library/aa241724(v=vs.60).aspx Best...
  4. Solo712

    how to calculate value in textbox

    You can't have two values in textbox b. You'd have to create an event (Button click ?) that modifies textbox b, like textboxB = textboxB + Eval(textboxA) Best, Jiri
  5. Solo712

    User Input Control Beyond Input Masks

    It is possible, sure, an it's a good idea. But if an expiry date can be calculated by a formula (the life of the product seems to be a constant from what you write), and it is say the last day of the month that is 12 months from today, then you don't need to enter anything. The date could be...
  6. Solo712

    Populating Unbound Textbox on Form

    Paul is correct. You will not be able to get the unbound textbox carry a value dependent on the current row. The quickest fix would be to redefine the field as "calculated" bound field if you use A2010 or later. Best, Jiri
  7. Solo712

    Use a variable in a report for DLookup

    In the alternative, you may pass the variable (that you extracted with the Input box) in as the "WHERE" argument for the report, e.g. DoCmd.OpenReport "myReport", acViewPreview, , "[Route Number] = routenr" where [Route Number] is the field that you want the report on and "routenr" is the...
  8. Solo712

    Dcount of date field

    Hi Carl, for starters I doubt that the DCount statement as you presented it would execute at all: DCount("[ID]","Works Orders","Operations Confirmed Date=[Forms]![Work Orders New]![Operations Confirmed Date]") You need to use square brackets for fields that have space in their names. The...
  9. Solo712

    Assigning a Null value to a Control

    Doc, this is arguing past my point. Can you give me one example where, a) the bang used with a form does not signify a member of its default collection, i.e. the form controls, and b) where the notation Form!Control does not return the same thing as Form!Control.Value ? Much obliged. Best, Jiri
  10. Solo712

    Executing a module from another DB

    Right! :D I am trusting by nature! Best, Jiri
  11. Solo712

    Executing a module from another DB

    You are welcome. Best, Jiri
  12. Solo712

    Assigning a Null value to a Control

    Is the Form [Invoice Payments] loaded? Best, Jiri
  13. Solo712

    Assigning a Null value to a Control

    FYI, jleach: this is incorrect! You never need to use the .value property when using the "bang" notation to an object. Read here: http://bytecomb.com/the-bang-exclamation-operator-in-vba/ Best, Jiri
  14. Solo712

    Executing a module from another DB

    Darrin, make sure you consult some sources before making categorical statements ! https://bytes.com/topic/access/answers/900155-how-run-procedure-database-code-another-db bah, see above for an example. Best, Jiri
  15. Solo712

    'Before Update' Code Not Working

    I am with missinglinq on this. Use the form's BeforeUpdate event and cancel if the text is not entered in the individual controls. Change the code to the following:If Nz([First_Name])= "" Then ' catches Null and zero length string MsgBox "Please enter your first name.", , "...
  16. Solo712

    Need help creating a validation rule.

    Run this in the form's BeforeUpdate event: Select Case Left(Me!Myfield,1) Case "5", "8", "9" 'Do nothing Case Else MsgBox "Field may only start with '5', '8' or '9'" Cancel = True Me.Myfield.SetFocus Exit Sub End Select Substitute...
  17. Solo712

    Create running sequence number

    It's not as bad as that Doc, is it ? :) ' Function generates next code in sequence ' to a passed argument in the form of ' ZZ-000001-0001 Public Function GenInvCode(gnIN As String) As String Dim oo As Variant, a As Long, b As Long, pfx As String, om As String pfx = Left(gnIN, 2) a...
  18. Solo712

    Merging 2 Databases

    Some questions to consider: 1) Does the data on the surface supersede data in the main database. In other words, if records with IDs exists in both dbs, which are the records that prevail ? 2) Do you have the cutoff points for all tables (IDs) after which the databases were separated ? 3)...
  19. Solo712

    Creating Query with selective field

    Yes, I would recommend creating a table with the tanks as rows, e.g.: ID, Tank Name/Desc Opening Balance Date (of Opening Balance) Your second table then would register all the transactions against the tanks, i.e. the date, transaction description amount added or consumed. You could get the...
  20. Solo712

    Creating Query with selective field

    Hi, to begin with, you would be much better off to redesign your inventory table to have each tank as a separate row in the table, and not as a column (field). Best, Jiri
Back
Top Bottom