Search results

  1. N

    Calculation in Form using field in Table

    My sincerest of apologies. James your first solution was correct. The code had a space between 'cost & (£)' the field does not. All working now. Thanks James & VBA for your help.
  2. N

    Calculation in Form using field in Table

    Same error without the txtCPU which certainly suggests a problem with the field names.
  3. N

    Calculation in Form using field in Table

    Thanks for your thoughts on this. James is correct in that I am getting #Name? error still. VBA, Unit Cost(£) and Type are both fields in tblPriceList and Memory only appears in Type once, i.e the unit cost is already held against the type. Regards, Nigel
  4. N

    Calculation in Form using field in Table

    Hi James, =[txtCPU]*DLookUp("[Unit Cost (£)]","[tblPriceList]","[Type]='IntelMemory'") Same result. Nigel
  5. N

    Calculation in Form using field in Table

    Thanks for reply James, I was thinking along those lines but presumed I was getting the syntax incorrect. I have entered the following in the control source of txtCalc:- =[txtCPU]*DLookUp("[Unit Cost (£)]","tblPriceList","Type='IntelMemory'") This results in #Name? appearing in the txtCalc...
  6. N

    Calculation in Form using field in Table

    Hi All, Coming back to access after a long break and I'm sure this is a simple one. I have a table (tblPriceList) and a form (frmPriceCalc), the form is used to calculate prices. I need to perorm the following calculation:- txtCPU * [tblPriceList.Unit Cost(£)] where type = Memory At the...
  7. N

    Date a record was last updated

    Does Access keep a history of when a record was last updated, and if so can I perform a query on this value. Cheers, Nigel
  8. N

    Export to .csv Losing leading zeros

    Hi, I'm exporting a table to a .csv file. The table contains phone numbers with a data type of 'text'. When I look at the csv file strange things are happening e.g Phone number 08705329877 appears as 8.7E+09 if I expand the width of the field in the csv it changes to 8705329877 (miising the...
  9. N

    Data type mismatch 3464

    Thanks Harry.
  10. N

    Data type mismatch 3464

    I've seen a few posts when searching on this but none which solve my problem. Private Sub Combo0_Change() Dim db As DAO.Database Dim rs As DAO.Recordset Dim emp Long emp = Me!Combo0.Value Set db = CurrentDb Debug.Print emp Set rs = db.OpenRecordset( _ "select daystaken from tblholstaken where...
  11. N

    A simple one on TAB I hope

    Ta very much
  12. N

    A simple one on TAB I hope

    I have a form which has three command buttons. cmdSaveAndExit, cmdExitNoSave, cmdClear. These are the last three controls in the forms tab order. How do I prevent the user from using tabbing right through these controls to a new record. Any help would be appreciated.
  13. N

    CAN THIS VBA BE SIMPLIFIED

    Thanks Robert, I've substituted my code with your example and it works fine.
  14. N

    CAN THIS VBA BE SIMPLIFIED

    I am fairly new to VBA and would like to know if the following code could be simplified using arrays. The code fires on the click action of a SAVE command button. It is checking that all fields have been completed. Any help would be appreciated. Private Sub cmdSaveExit_Click() 'Declare...
  15. N

    Locking a form if the record has been "signed off"

    This is the first time I've offered a solution rather than posting a question, hope its relevant and helps you:- Private Sub Form_Current() If Me![Combo23] = "Closed" Then Me.AllowEdits = False Me.Detail.BackColor = 10092543 End If You would obviously replace the condition with your own. This...
  16. N

    Search subform

    I have created an asset database, the main form contains details on all assets. Within the main form there is a sub form, incidents, this details any incidents associated with that asset, the one to many relationship is set up using the asset id. I want to perform searches on such things as...
  17. N

    option group

    Thanks for your advice
  18. N

    option group

    I have an option group set up for status. 3 toggle buttons:- OPen Pending Closed. If closed is selected an input box requests closers name. If cancel is selected on the input box a message box is issued saying 'incident will remain open'. My problem: If the incident remains open I want the open...
  19. N

    Filter on subform

    Hope someone can help. I am setting up an employee database in Access 2000. Initially I am just interested in holidays. My sub form (FrmSubHol) has three fields; Holidays Taken =sum([days taken]) Holidays Acquired =sum([days acquired]) Holidays Left = 25 - [days taken] + [days acquired]...
  20. N

    Format Date Field

    Thanks Rich, I've worked out the Date & Format functions (I think). However I'm still struggling, I'll try and explain what I'm attempting to do more clearly. I have set up an employee database for my department. I have a form FrmStaffEdit which contains name, date joined, holiday entitlement...
Back
Top Bottom