Search results

  1. Fear Naught

    Time saving form question?

    Hi CuleDude. The ShaneMan is right in what he says about database normalisation. You need to have at least 3 tables for what you are trying to do. Also the fields in your table need changing. The fields Date and Name are reserved words and WILL give you problems along the way if you don't...
  2. Fear Naught

    run more than 1 query and display on form

    The record source of the form will be either a query or table and all bound controls on the form will need to be part of that record source. You cannot refer to a different record source in the way you have tried to do. The only way (that I know of) to do this is to write a function that...
  3. Fear Naught

    Recording Time Values

    Hi Ian, Sorted. Firstly I would recomended changing the name of your text box that holds the value for TimeAOGReported from being called "Time" to something more descriptive like "txtTimeAOGReported" which I think is a reserved word. Also the TimeAOGCleared text box did not have a format set...
  4. Fear Naught

    Recording Time Values

    What format are you using for the "TimeAOGCleared" field? If thisis set to hours and minutes only then it is possible that the time will show the same as when the record is created depending on how fast the user moves through the form.
  5. Fear Naught

    Update main form and go to specified record

    The sub procedure Init_Globals() fails. I get an Oject Library error when trying to pass the parameters to the sub procedure from the add owner form.
  6. Fear Naught

    Running a query in VBA

    Well I have renamed the field "Date" to "FuelDate" and still get the same error. The SQL for the query is now: SELECT Max(Mileage) AS mMile FROM tblfuel WHERE (((FuelDate)<Forms!frmFuel!FuelDate) And ((UserNameID)=getuserid()) And ((VehicleID)=getvehicleid())); The function that calls is...
  7. Fear Naught

    Delete record button on form

    Gary, I have copied you code and added the relevant line of code for you. You will of course have to change the "comboboxname" part with the name of the combo box on your form. Depending on what version of access you are using I would replace your "DoCmd" lines with the following...
  8. Fear Naught

    Running a query in VBA

    I have tried this but get Run-Time error 3061; Too few parameters. Expected 1. Debug shows the faulty line to be: Set Rs = CurrentDb.OpenRecordset("qryMaxMiles") There are no parameters set in the query!!
  9. Fear Naught

    Running a query in VBA

    Thanks for your reply Karma. To alias a column name you do need to use the "AS" qualifier but not when aliasing a table name. My SQL runs fine as it is in a stored query. Whenin the debugger the date variable " & Forms!frmFuel!Date & " gives me a date. For some reason the recordset part...
  10. Fear Naught

    Subform reference each row event

    What is the "continuous format" feature?
  11. Fear Naught

    Running a query in VBA

    Colin, Thanks for that. However, to me that seems to be just putting another layer into the function. Incidentally how would I open the macro through VB. Also remember I do not want to open the query for viewing just get result of the query to pass back to the form. Fear Naught!
  12. Fear Naught

    Running a query in VBA

    Hi folks. I have tried to find the answer in these forums to no avail. I have a database that staff use to record their business journies, fuel bought etc, etc. On the form for inputting fuel bought users have to input the mileage on the car when they re-fuelled. What I want to show is the...
  13. Fear Naught

    Delete record button on form

    You need to requery the combo box. Use code something like this after deleting the record: me.comboboxname.requery
  14. Fear Naught

    help needed with security alternative

    A pleasure to help. There is always lots to learn in Access and VB. :-)
  15. Fear Naught

    help needed with security alternative

    I have buildt my own login form for a small system we use in the office. As explained above I have a module with Global Variables (not Public). At the login stage I assign values to these variables such as the user name, user id, their status and whether they are admin users. The code I use...
  16. Fear Naught

    need easy soulution

    Why do you need the add field? This goes against the principles of database design. All calculated data should be returned from a query for use in reports etc and not sotred in the database.
  17. Fear Naught

    Print Pop-up Modal Report

    Have you tried the CTRL + P key presses to print the report?
  18. Fear Naught

    Memo 255 character limit - not printing on report

    Even thought it appears to have worked for the original postee can anybody explain why ??
  19. Fear Naught

    Count Previous WorkUnits

    You need to add a criteria in the DCount() function of the actual work unit you are trying to count. Your existing code just counts all records in the table. HTH
  20. Fear Naught

    Simple Counting Question

    I am not sure that you can do it with DCount() however I have written a sub routine that will do it for you. Copy the following into the code for the form: Private Sub CountShots() Dim int2shots As Integer Dim int3shots As Integer Dim int5shots As Integer Dim int4shots As...
Back
Top Bottom