Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. irishandy

    How to make a pop up box in which a user can enter a date

    Thanks to both of you for your replies. The InputBox VBA function looks to be just what I need, so thanks for that PHV. Aceman - nice idea but I'll go with the inputbox.
  2. irishandy

    How to make a pop up box in which a user can enter a date

    Simple problem except I can't work out how to do it. I've a date field on a form. The subform data is linked to that date. I want the user to be able to change the date but only explicitly by clicking a button, being prompted to enter a date, then entering that date. The button should then...
  3. irishandy

    Empty recordset: how to stop form from creating a new record?

    Thanks for all the replies - it was the last line of that of RoyVidar that helped me see the light. The Current event of the form was calling various display functions however some of them were assigning values to bound as well as unbound fields. Hence a new record was being created each and...
  4. irishandy

    Empty recordset: how to stop form from creating a new record?

    Yes, but the problem is that the record has already been created therefore no matter if the user chooses yes or no the record will still remain. Ultimately the end user should not have to be concerned with these "ghost" records at all.
  5. irishandy

    Empty recordset: how to stop form from creating a new record?

    The same form is used for entering records, viewing records, editing records and deleting records. The user is also able to select various subsets of records by double-clicking on query names in a listbox. I want to stop "ghost" records being created. At the moment if there is an empty...
  6. irishandy

    Recordcount error: too few parameters

    Thanks for your help - I've tweaked it a bit and it's doing the trick.
  7. irishandy

    Recordcount error: too few parameters

    The dCount function isn't able to enter in such a parameter therefore it returns "The expression you entered as a query parameter produced this error: 'The object doesn't contain the Automation object 'Enter Staff ID.''" To give this some context: the query names are all in a listbox on a form...
  8. irishandy

    Recordcount error: too few parameters

    Here's the SQL from the query... SELECT Notes.Logged_By AS N_LoggedBy, Notes.* FROM Notes WHERE (((Notes.Logged_By)=[Enter Staff ID]) AND ((DatePart("yyyy",[Date_Received]))=DatePart("yyyy",Now())) AND ((DatePart("y",[Date_Received]))=DatePart("y",Now())));
  9. irishandy

    Recordcount error: too few parameters

    Ah - I like that solution. I've copped on as to why the parameter error was coming up - the two queries in question both request a Staff ID to be entered (it's a 5 digit number). Any ideas on how I can deal with that problem?
  10. irishandy

    Recordcount error: too few parameters

    I've done a search for this in the forum but can't find the exact answer. All I want the piece of code to do is to tell me if the query returned records. I've included my code below. At the moment it runs fine if there are records to return however it produces the following error if there are no...
  11. irishandy

    Guaranteeing at least one record in a query

    I've got a query that is used as the data source for a form. However if the query returns nothing the form is completely blank - i.e. no controls appear at all. How do I ensure that the query returns at least one record, even if that record just has something in a calculated field (e.g. the...
  12. irishandy

    Using BeforeUpdate to run code: problems closing form

    Ah, nice one. Thank you kindly Jebry.
  13. irishandy

    Using BeforeUpdate to run code: problems closing form

    Jebry, I tried your code as is - pasted it straight in. Same result as with mine. What I've decided to do as an interim solution is to use the close button in the corner (i.e. solution #1) but to trap the error message and supress it. It's error 2169 - as far as I know it's a known bug in...
  14. irishandy

    Using BeforeUpdate to run code: problems closing form

    I already tried a variation of that (it was identical except it said "logging this record" instead of "closing"). It seemed like the obvious solution however the form's BeforeUpdate() kicks in after you say no. Here's the sequence of events... DoCmd.Close BeforeUpdate then kicks in and...
  15. irishandy

    Using BeforeUpdate to run code: problems closing form

    Just the standard exit code: Private Sub Button_Exit_Click() On Error GoTo Err_Button_Exit_Click DoCmd.Close Exit_Button_Exit_Click: Exit Sub Err_Button_Exit_Click: MsgBox Err.Description Resume Exit_Button_Exit_Click End Sub
  16. irishandy

    Using BeforeUpdate to run code: problems closing form

    I've been going to hell and back with this one. I've got a form that I'm using for data entry. Users enter data and then press a "Log Case" button to enter their userID and a timestamp. It is not essential that all cases be logged straight away but it is essential that a user be prompted to log...
  17. irishandy

    Query with optional parameters?

    Good point. UserID was a bad example - the fields that need to be queried are all 1 character fields, e.g. 'R' or 'P', except the date field. So, it's fine for all of them. This method works for the date field when you either enter a specific date or no date at all (which is still fine)...
  18. irishandy

    Query with optional parameters?

    Excellent - for this job that works a treat. Thanks.
  19. irishandy

    Query with optional parameters?

    I've got a table that I want to get information from. Within the table there are five fields that need to be queried. However, the user should be able to disregard a parameter if they don't care about that field. It is a simple database that I'm setting up for someone to hold some very basic...
  20. irishandy

    allow user to leave all option group boxes unchecked

    Ah, thanks. I'd forgotten completely that you could do that.

Part and Inventory Search

Back
Top