User Profile

Collapse

Profile Sidebar

Collapse
atc
atc
Last Activity: Oct 6 '07, 05:52 PM
Joined: Feb 26 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • atc
    replied to Mail merge problem
    Yes i changed the line of code so its revelvent to my project.
    So i have no idea whats up with it.
    Any more ideas?
    john
    See more | Go to post

    Leave a comment:


  • atc
    replied to Mail merge problem
    If I click cancel when the message box comes up. My templete does not merge but the new document does not appear.
    ATC
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    Thanks for all your help NeoPa.
    The problem is solved.
    I'll take your advise on board.
    ATC
    See more | Go to post

    Leave a comment:


  • atc
    replied to Mail merge problem
    Thanks for your help mary. I modified your code for my database. Word loads as expected but word brings up a message box called "select table". It has queries and tables in it. So I select the query I want. Then word loads up a new document called "Form Letters1". It is the same as my template. Is there any way to modify the code so the message box does not appear and the new document is not created.
    Thanks again...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    Ok thanks for the advice. Sorry that it is making your task to find a solution harder.
    John
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    Thanks for your time on this NeoPa
    Ok i want to try and not allow duplicates to be entered as you know. By this a mean a list of records like this would be ok:
    court 1,indoor court, 07/03/2007
    court 2,indoor court,07/03/2007
    court 5,outdoor court,07/03/2007
    court 1,indoor court,08/03/2007
    court 2,indoor court, 08/03/2007
    etc

    A list like this would not be ok:
    court 1,indoor court,07/03/2007...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    Do you want me to resend as a zip or is mary going to resend as a zip?
    john
    See more | Go to post

    Leave a comment:


  • atc
    replied to Mail merge problem
    Thanks for your help.
    Now I am getting an error for
    Code:
    objWord.MailMerge.DataSource.QueryString
    The error is "QueryStrin g is not a method"
    Also when word is lanuched I have to select the query i want to merge. Is there any way I can get round this.
    Thanks again
    ATC
    See more | Go to post

    Leave a comment:


  • atc
    started a topic Mail merge problem

    Mail merge problem

    Sorry but another question from a newbie.
    I am trying to create a mail merge based on a query. I have a button on a form (form is based on query). I found this code in one of the discussions and tried to modify it for my needs.
    Code:
    Private Sub Command36_Click()
    Set objWord = GetObject("C:\Documents and Settings\xxxx\My Documents\merge.doc", "Word.Document")
    'turn off alerts
    objWord.Application.DisplayAlerts
    ...
    See more | Go to post

  • atc
    replied to Stop Duplicates
    NeoPa
    I have sent a another copy to mary. Try that one.
    john
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    It's in the subform called BookingSubform at the moment.
    John
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    NeoPa
    Here are the results from the immediate section:

    (CourtID=1) AND (ScheduleDate=# 2/2/2007#)
    1 - 2 Feb 2007
    (CourtID=4) AND (ScheduleDate=# 2/2/2007#)
    4 - 2 Feb 2007

    First I tried court 1 for 02/02/2007 (this is a duplicate). Then I tried court 4 for 02/02/2007 (not a duplicate).

    Answer to A: yes mary was sent a copy by e-mail
    B: The main form is called Bookings....
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    Hello again. I am now using your code:
    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
      Dim strWhere As String
      Dim varKey As Variant
    
      strWhere = "(CourtID=" & Me.CourtID & ") AND " & _
                 "(ScheduleDate=" & Format(Me.ScheduleDate, "\#m/d/yyyy\#") & ")"
      varKey = DLookup("[CourtID] & Format([ScheduleDate],'
    ...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    I have now checked names.
    Now have this code
    Code:
    Private Sub ScheduleDate_AfterUpdate()
       If Not IsNull(Me.CourtID) Then
    	  CheckDate
       End If
    End Sub
    
    Private Sub CourtID_AfterUpdate()
       If Not IsNull(Me.ScheduleDate) Then
    	  CheckDate
       End If
    End Sub
    
    Function CheckDate()
      Dim strWhere As String
      Dim varKey As Variant
    ...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Double Booking Problem
    Ok sorry NeoPa i thought two heads may be better than one. I'll post in the orginal thread.
    john
    See more | Go to post

    Leave a comment:


  • atc
    replied to Double Booking Problem
    Thanks for your continued help.
    With this code is place (entering the data courtID of 1 and a date of 01/03/2007 - not a duplicate) I get the same message as before but when I click ok it keeps the courtID of the new record, deletes the schedule date and moves to courtID of a new record below.
    I also get the same result if the data is a duplicate.
    ATC
    See more | Go to post

    Leave a comment:


  • atc
    replied to Double Booking Problem
    Thanks for your help. I
    have now moved it to the before update event. When I try to input court 1, 01/03/2007 for example (not a duplicate). I get a message of "(CourtID=1 ) AND (ScheduleDate=# 3/1/2007#) 1 - 1 Mar 2007".
    I click OK and then have to press escape to exit the cell (cant click out of it). This takes the datasheet to what it was before. So i cant add new records or edit records.
    Any ideas?
    ...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Double Booking Problem
    By this I mean court 1 on 01/03/2007, court 2 on 01/03/2007, court 1 on 02/03/2007 etc would be acceptable records.
    But court 1 on 01/03/2007 and court 1 on 01/03/2007 would not be.
    Thanks
    ATC
    See more | Go to post

    Leave a comment:


  • atc
    replied to Double Booking Problem
    Thanks so much it works like a charm. Would it be possible for you to try and solve one other small problem. At the moment I have this code
    Code:
    Private Sub Form_AfterUpdate(Cancel As Integer)
      Dim strWhere As String
      Dim varKey As Variant
    
      strWhere = "(CourtID=" & Me.CourtID & ") AND " & _
                 "(ScheduleDate=" & Format(Me.ScheduleDate, "\#m/d/yyyy\#")
    ...
    See more | Go to post

    Leave a comment:


  • atc
    replied to Stop Duplicates
    When this code is in use I cant add or edit records as before. I get this message this time "(PitchID=4 ) AND (ScheduleDate=# 2/28/2007#) 1 - 28 Feb 2007" when trying to enter pitch 4 and a date of 28/02/07.
    ATC
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...