User Profile

Collapse

Profile Sidebar

Collapse
beechclose
beechclose
Last Activity: Mar 5 '08, 03:08 PM
Joined: Jul 27 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • beechclose
    replied to Year Function
    Thanks - it seems to be working now!
    See more | Go to post

    Leave a comment:


  • beechclose
    replied to Year Function
    I have amended my code to

    Code:
    Private Sub Form_Open(Cancel As Integer)
    Dim mydate As Date
    Dim myyear As Date
    
    mydate = Date
    myyear = Year(mydate)
    
    End Sub
    but I now get 'can't find the field Year referred to in your expression' as an error message?...
    See more | Go to post

    Leave a comment:


  • beechclose
    started a topic Year Function

    Year Function

    I need to extract the year part of a date and I have the following code to test

    Code:
    Private Sub Form_Open(Cancel As Integer)
    Dim mydate, myyear
    
    mydate = Date
    myyear = Year(mydate)
    
    End Sub
    But it gives me a type mismatch when trying to find the Year of mydate. The same problem occurs with the Month function but the Day function works fine. I have used this code before without...
    See more | Go to post

  • beechclose
    started a topic Date format in mail merge

    Date format in mail merge

    I have an form in Access which runs a make-table query and then mail merges the contents to Word. One of the merged fields is a date - in Access the date appears in 'UK' format correctly but when merged to Word (with language set to UK) the date appears in 'American' format. Any ideas on how I can change this as my client is inisistent that the date appears in UK format?

    Thanks
    See more | Go to post

  • beechclose
    replied to Help with Dlookup syntax
    Hurrah - thank you - you've stopped me going mad!
    See more | Go to post

    Leave a comment:


  • beechclose
    started a topic Help with Dlookup syntax

    Help with Dlookup syntax

    I have a form based on tbl_Wedding_Pro ducts which contains a combo box cboPID which looks up product details in tbl_Products. I am trying to display the cost of the product (in text box txtUBP), held in tbl_Products, for the product selected in cboPID but it doesn't work. Can you sort my syntax out please?

    txtUBP = DLookup("[Product Buying Cost]", "tbl_Produc ts", " [tbl_Products]![Product ID] ='" &...
    See more | Go to post

  • beechclose
    started a topic Referencing a form

    Referencing a form

    Hi

    I have a fairly complex database with many tables and forms (currently 38). Now when I create a new form it does not appear in the VBA Project Explorer window and when I try to reference it I get an error message saying it is an unknown form BUT it does exist in the access forms window. Do you know why this is happening and what I can do to overcome it as I need to utilise subforms and thus have to reference these forms.
    ...
    See more | Go to post

  • beechclose
    started a topic Calculated fields & time dependent data

    Calculated fields & time dependent data

    Hi

    I have a table called tbl_Products which stores details of available products including current price. I have a second table called tbl_chosen_prod ucts which stores the product id and quantity of the product required. I have written a query which allows the customer to choose their product, enter the quantity and calculates the total cost of the chosen product at the moment and that works fine BUT if I were to update the cost...
    See more | Go to post
No activity results to display
Show More
Working...