Search results

  1. F

    using a function in a query for if/then/else

    Wayne, I probably can't spend much more time on this right now, but I was thinking normalization related to breaking the table into smaller tables so things wouldn't repeat in 1 big table. Since there are 902 (= 22 x 41) possible values (none repeating) of the field I'm calculating, I don't...
  2. F

    using a function in a query for if/then/else

    Brian, I have a table called tSalary which has 41 of these Step fields. The values I want are in that table. One of the fields is called Step070. The 42nd field in tSalary is called Grade. There are 22 records in this table - it goes from Grade 005 to 026. An employee's salary is determined...
  3. F

    using a function in a query for if/then/else

    Brian, Thanks for the correction. Now it's like the if/then/else sample. I get 0, (instead of the true value for the Step fields) for the few fields in my sample code. I'm still don't know how to get the true values of those Step fields from the tSalary table.
  4. F

    using a function in a query for if/then/else

    Regarding the suggestion about using Case, I did this: Public Function TryThis(BYStep As String) Dim Step070 As Integer Dim Step080 As Integer Dim Step160 As Integer Select Case BYStep Case BYStep = "07.0" TryThis = Step070 Case BYStep = "08.0" TryThis = Step080 Case Else TryThis...
  5. F

    using a function in a query for if/then/else

    I have a field I want to calculate using IIF. There are about 40 possible values, thus I have about 40 nested IIFs. Because I get "query is too complex" when I try to nest all 40 IIFs, I've had to break this down into 3 fields. I then have to do a little more manipulation to end up with the 1...
  6. F

    How To Update Data

    I've been trying all day to do something similar (I was only trying to update 1 field and only had 1 join between the 2 tables). I finally got it to work by removing that join. However, right before I got it to work, I used something I found here in the forum, "nz([tablename].[fieldname]...
  7. F

    putting result of prompt in MsgBox

    Using a list box where the user selects the month & year, I was able to have the user select the month & year and have that month & year appear in the message box. However, after trying all kinds of things, I can't figure out how to pass that month & year to the update query. The best I come...
  8. F

    putting result of prompt in MsgBox

    I was starting slow by, first, trying to figure out how to have the user see what he/she entered after it was entered. Then, I would give the user the option to not run the update query if the wrong date was entered. I think I know how to do the latter, but I'm not sure how to do the former...
  9. F

    putting result of prompt in MsgBox

    I have a command button that imports a text file. Since this file doesn't have a month field, I also run an update query which puts the month (based on what the user enters when prompted, which comes from the qUpdateMonth query) in that field. Breifly, I do this with the following code...
  10. F

    running a routine from another form

    Thanks Jack. That worked. I'm sloooooowly learning.
  11. F

    running a routine from another form

    I have 3 forms that run different reports. All 3 forms have a command button that runs several (make table and append) queries - the same several queries. I've been testing the command button that updates the tables (along with a progress meter) on one of the forms. That works fine on the one...
  12. F

    function for a report; KB article 129096

    Harry, The only way I could figure out how to do this is to have [FirstOfGRegTo] on every record of the table from which the report is based. This field comes from another, smaller table where there is an amount for each Sprg. Either I couldn't do DLookup, or if it was possible, I read too...
  13. F

    function for a report; KB article 129096

    I'm using Access 97 and I'm trying to use code from MS KB 129096. The first function in method 3 of the article has the following: Function CalcProduct(R As Report) Dim tmpAmount As Double tmpAmount = R![UnitPrice] * R![Quantity] OrderTotal = OrderTotal + tmpAmount GrandTotal = GrandTotal...
  14. F

    minimize a form

    Kevin, That did it. You're right - invisible is better. I guess Broadband's not all it's cracked up to be. Thanks again. ~Mark
  15. F

    minimize a form

    I keep getting the error "object doesn't support this property or method" when I close the 2nd form. Originally, both forms had a Border Style of "dialog." I was thinking the Border Style had something to do with the error message so I changed them to Thin and then Sizable, but I still get the...
  16. F

    minimize a form

    I don't want to maximize the 1st form, but I do want to restore it to the size it was before selecting the 2nd form. I would like it to happen automatically after hitting the X (close button) on the 2nd form. So far that hasn't happened. Should I create a command button on the 2nd form to...
  17. F

    minimize a form

    You guys are good and fast. It worked. I guess I should've also asked how to maximize the mainform after closing the form that I selected from the mainform. I guess there's something like DoCmd.Restore after closing the second form, or something.
  18. F

    minimize a form

    On my mainform, I have command buttons that open other forms. Is there a way for the mainform to be minimized when one of the other buttons is selected (and opens the new form)?
  19. F

    description for table from make-table query

    Ian, I never thought about delete and append queries, but that sounds like 2 steps for each make-table query that I have. It took me awhile, a few months ago, to switch from all select queries to select and make-table queries (when I was getting "query is too complex" messages). I'd rather...
  20. F

    description for table from make-table query

    Is there a way to create a description in the database window for a table that gets created when running a make-table query? I have several make-table queries that will get run often, in order to get up-to-date information for a report. Now, when the make-table query is run, the description in...
Back
Top Bottom