Search results

  1. S

    conditional text content

    Try searching the help files for the use of IIf, your code might look something like the following: IFF ("[Before OH] < 0 AND [Before OH]+[OH Cost Calc]<0","COST", " ") Hope this points you in the right direction. Paul
  2. S

    Fixing dates

    I am going to assume that this information is part of a new record and is set because it is a new record. Therefore, if you set the default value of the [Start Date] field to Date() it will set the value to today's date only when it is a new record. As you have it now (depending on where you...
  3. S

    AutoIncrement

    I usually set a form's allowadditions property to no because I want certain code to happen when a new record is added. I place a button on the form (Add Record button) with code similar to the following: Form.AllowAdditions = True 'allows records to be added DoCmd.GoToRecord , , acNewRec...
  4. S

    Suggestions for code for Unique id

    Your unique id for the client should not be based on pieces of information you get about the client. It will be used behind the scenes to relate all the information in the tables about the client. No one needs to ever see it (you don't need to see it on the forms). You can use autonumber to...
  5. S

    AutoIncrement

    Basically, DMax will find the largest value in a number field in a table or query. Your format for creating an id will cause problems because it is obviously text. You will need to break down the value to apply DMax. I use a similar method to create a family id in a table (format f1234)...
  6. S

    crosstab query and column headings

    Hi Pat, I've come to the same conclusion after trying many different approaches. Thanks for your input. Til next time. PLS
  7. S

    crosstab query and column headings

    Hey Harry, I can do that without a problem for my original query which pulls the monthly data I need. The problem arises when I create a crosstab query based on the data. The crosstab will not allow me to sort the headings based on another field, only on the fields that I use to calculate my...
  8. S

    crosstab query and column headings

    Thanks for your reply Pat, I tried your suggestion and it does change the order that the columns are listed but unfortunately it uses alphabetical ordering instead of by date. The columns will have the years ordered correctly but not the months. It'll go 2002 Apr - 2002 Aug and so on. I can get...
  9. S

    crosstab query and column headings

    Hi All, I am working on a database that is being used to track Guaranteed Investment Certificates. I have designed a crosstab query that pulls financial company names down the left side, has months across the top and it calculates the dollar amounts in the grid. It tells me the amounts by each...
  10. S

    parameter prompt size

    Deep down I knew I would have to design a form to handle the situation. I was mostly curious about whether I could change the size of the input box (such things would make life easier). Just one of those little things that eat away at you until you know the answer. Paul
  11. S

    parameter prompt size

    Here's a dumb little problem for you: I've set a parameter to ask the user for a start date and an end date. The prompt I want to display is a bit long (Enter Start date for account maturity ex:m/d/y) but I think its needed to prevent error. However, the parameter prompt won't re-size...
  12. S

    Email attachment error

    Greetings, I have a designed a form that allows users to send an email to a list of clients from Access. There are three fields: subject, message and attachment path. If any fields are left empty I can pop up a message to the user and allow them to send the email without the particular...
  13. S

    Age Nearest

    I was just searching on a topic when I came across your post. I don't know if you've found a solution yet so here is a function I use to calculate nearest age. I actually got this from a friend in a forum and put in a touch of my own. Dim SerToday As Date Dim SerBirthday As Date Dim...
  14. S

    Printing Word Documents

    The closest I can get to printing a Word document without opening it is to cheat a little by opening it, printing and then closing it using code. Try the following function, you may be able to play with it and make some improvements. It may work just fine if you take the Visible = true line out...
  15. S

    Update totals

    It sounds like you need to Requery the text box that holds the calculation on the main form. On whatever event you trigger the calculation on the subform, add code to Requery the other field. Me.[name_of_text_field].Requery You may have to use: Forms![frm1]![name_of_text_field].Requery Paul
  16. S

    Closest age

    Thanks Matthew and charityg for your replies. While I like short pieces of code, I did some testing and Matthew's worked out to be a bit more accurate when the dates were close to a half year. just in case anyone else uses the code, I did end up throwing in some extra code in case the date of...
  17. S

    Closest age

    I need to not only calculate a person's age based on their date of birth (no problem with this) but also the age they are closest to. It's an insurance policy thing. If a person is 47 years old but within a half year of being 48 (closer to being 48) then I want that age to appear in a calculated...
  18. S

    edit a read only form

    This should be done in visual basic. If you click the code button in form design and open the code editor, you can select the name of the button in the left drop-down box and the click-event in the right drop-down box and place Me.allowedits = true within that block.
  19. S

    Frustration abounds....

    If you want the value selected from the combo box to be saved in a particular field, set the control source of the combo box to that field. If you use the wizard to set-up the combo box, you can choose to have the combo box look up values in a particular table while having the selection saved in...
  20. S

    custom bars appearing with certain forms

    In the properties of the form you can select which menu and toolbar you want to be associated with that particular form. You don't need to do it using code.
Back
Top Bottom