Search results

  1. Fear Naught

    Simple question about records

    I would suggest that you have some code in the OnCurrent event of the form that sets the value of the combo boxes to that of the text boxes on the form.
  2. Fear Naught

    "rounding up" calculated expressions

    Why don't you try calculating the number of days first and through a division of 7 you can calculate the weeks. If the result is not an integer you can then just add 1 to the number of weeks. Without spending some time on this to workout some code (and today I do not have that time to spare -...
  3. Fear Naught

    VBA - error 2501 with opening next form

    I would suggest a couple of things: 1. Try running opening the form without the stLinkCriteria option. 2. The DoCmd.Save only saves the structure of the form and not the data. Try 'DoCmd.RunCommand, acCmdSaveRecord' instead There may be an issue with the syntax of your stLinkCriteria. (I...
  4. Fear Naught

    Moving to current record after a requery

    I have also added a breakpoint to enable debugging and when hovering the mouse over 'varBookmark = rs.Bookmark' it shows as 'rs.bookmar = <no current record.>' I am wondering if there is a syntax error in the line: rs.FindFirst ("QuoteItemID = " & Me.QuoteItemID) Although no errors are...
  5. Fear Naught

    Moving to current record after a requery

    I have a subform where the user enters the number of training days on a quotation. After the record is updated I do a requery on a text boxt on the main form that shows the total number of training days ordered for that particular customer. The problem is the focus then resorts to somewhere...
  6. Fear Naught

    Opening and Closing Forms

    I must be having a bad day!! I am developing a small application for staff to record fuel issues, business miles, credit card transactions and the like. I have a main menu form (switchboard) which I make .visible=false when I open another form. What I want to do is test to ensure that the...
  7. Fear Naught

    Default at the top of the list

    Hi RuralGuy. Thanks for the speedy reply. However, maybe I didn't explain myself very well, I understand why anything that starts with [ is at the top. I just assumed it was something "magic" in Access that showed it at the top but did not display the []. Maybe I have just had a very long...
  8. Fear Naught

    Default at the top of the list

    Excuse my ignorance on this subject. I can understand the logic behind the 'ALL' SQL Union statement but for the life of me I do not understand how putting square brackets [] round an option works. I have tried it with one of my applications but the option is then left with the [] characters...
  9. Fear Naught

    changing icon for mde!

    What you need to do is send the 'ico' file and the shortcut (which is configured to use your 'ico' file) with the mde file to your clients and create some form of install procedure that copies all files to the relevant folders.
  10. Fear Naught

    Generate many-to-many relationship

    You could write some code that loops through each record and the table to separate the the authors in each record and append them to a new table. This would take some doing but as you have a ';' between each author you do have a constant character with which to work. HTH
  11. Fear Naught

    Using CREATE TABLE with Currency and YES/NO

    And of course a comma is required between CURRENCY and Redeemed !!! :-)
  12. Fear Naught

    Duplication Problem with sql function in a query

    Why do you have duplicate IDs? These surely should be unique. Also why are you trying to add up the total of Drill with nails and Hammers with Paint. I think you need to normalise your database and as "mpb.vu2" says do not store calculated figures.
  13. Fear Naught

    Query returns "-1" instead of actual values.

    A second thought is that you might like to play with Crosstab queries for something like this.
  14. Fear Naught

    Query returns "-1" instead of actual values.

    The syntax of the subquery in each day is wrong. You need to construct the subquery for each day like this (Day 6 is the example as it returns a positive result): (SELECT tblvagter.label FROM tblusers INNER JOIN tblvagter ON tblusers.user_id = tblvagter.user_id WHERE...
  15. Fear Naught

    Edit Record function in VBA

    When you break into the code what is the value of x? You should be able to get this by putting your mouse over it on the highlighted line.
  16. Fear Naught

    Edit Record function in VBA

    The correct syntax is: s.AddNew When writing your code VB should assist you by giving you the options available in many cases. In this one when you type 's.' you get a combobox with the options available!! :-)
  17. Fear Naught

    Simple Open/Close Audit Trail

    I use a sumple logging table in my database but this also seems a good idea. What I can't understand is what the variable 'FileNum' does especially as it is dimensioned as an integer and its value set with what I can only assume is another integer variable that is not in the code. Can the...
  18. Fear Naught

    Edit Record function in VBA

    How many records do you have in "tbl: Summary of Analysis". If there are less records than need updating then you will of course have a problem as you will have nowhere to move to. Should you not be appending records to "tbl: Summary of Analysis" rather than updating them?
  19. Fear Naught

    check box tool for forms

    As ThreeCrow says you need a field in the tale to that records the value of the checkbox. Also in the code for the OnCurrent even of thre table you were making the check box value ot be false hense changing everything back to a white background.
  20. Fear Naught

    Edit Record function in VBA

    I have laid out your code in a more structured way so it is easier to read. I have made the following changes: 1. Used DAO for retrieving data (ensure that the Microsoft DAO 3.6 Object Library is selected under references). 2. In the Loop to determine the value of [Bas Num] in the 't'...
Back
Top Bottom