User Profile

Collapse

Profile Sidebar

Collapse
copleyuk
copleyuk
Last Activity: May 23 '11, 06:33 PM
Joined: May 5 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Depending on how you are planning to determine the month i.e is it the current month of the year or a selected month from a list then the answer varies.

    However I think if I get what you are asking correctly then the answer should be:

    Dim cpumainfrm, cpusubfrm, customername as string
    Code:
    cpumainfrm = me.cpu_asl_%
    cpusubfrm = forms!mainform!subform!cpu%
    
    customername = me.customername
    ...
    See more | Go to post

    Leave a comment:


  • Hi Stewart,

    have tried that and get = True

    The complete sub is
    Code:
    Private Sub RefrenceNumber_BeforeUpdate(cancel As Integer)
        On Error GoTo Err_RefrenceNumber_BeforeUpdate
        
        Dim rs As DAO.Recordset
        Dim ref As String
        ref = Me.refrencenumber
        
        
        
        Set rs = Me.Recordset.Clone
        rs.FindFirst "[refrencenumber]
    ...
    See more | Go to post

    Leave a comment:


  • Thanks Stewart, but I'm still getting the same error message.

    There are no other events happening as before update and there is no validation rules set for this field.

    Any further info would be great thanks.
    See more | Go to post

    Leave a comment:


  • I'm getting an error stating that:
    The before update or validationrule property for this feild is preventing microsoft office access from saving the data in the field...
    See more | Go to post

    Leave a comment:


  • copleyuk
    started a topic How to make recordsetclone data always accurate

    How to make recordsetclone data always accurate

    I have a database with a number of users entering data into an SQL database from a form.

    The form is set so that when entering data, if a reference number has already been used the form will display the matching information using recordsetclone.

    code is as follows:

    Code:
     Dim rs As DAO.Recordset
        Dim ref As String
        
        ref = Me.refrencenumber
        
        Set rs = Me.Recordset.Clone
    ...
    See more | Go to post

  • copleyuk
    replied to How do you count time values?
    Squashed and zipped and its down to 2.5MB

    Even with all records in the table it still counts correctly. Its only when the table is set as a linked table that the problem arises so I'm not sure how to go through and work out whats causing these issues!
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Tried a number of things to replicate the problem in the offline cut down version but the only time the error occurs is when I paste the entire linked table into the cutdown database.

    If I append to an existing table or paste the structure and/or data then everything works as you would expect...
    I can therefore only assume that there is something different between the server stored table and how the data is viewed and handled ...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Hey NeoPa,

    yeah, on the cut down version the count runs as expected.
    Copy the same code to the actual version - "0"!

    Not sure what it shows other than it would appear to be the live data set only that is effected.
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Hey guys,

    I have managed to generate a massively cut down version of what I think is the relevant stuff.

    You'll have to excuse any bad-habits etc that are in the coding (I didn't even know what VBA was 7 months ago! :s)
    Let me know if there is anything that does not make sense of whatever...

    However, at the same time I did what mariostg suggested and ran the original piece of code against the cut...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Erm... I will try and sort a copy of the database but it is a bit of a beast (65,000+ entries, 25+ linked tables, more forms then you can shake a stick at and just to make things even more fun - split front end/back end to a SQL server with just about everything being pass through not local) and contains sensative information which means that certain fields would need to be cleared out before sending it once a local copy was made available... However,...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to Microsoft Excel 2007
    Not sure if I'll get in to trouble for answering this... sorry in advance if I shouldn't have!

    However, I think that you need the VLookup function.

    The Lookup_Value being either the cell or range of cells you want to look for (i.e the cell you are putting the date in)

    Table_Array being the range of cells with the values to search and return (i.e 100hrs and 1000 units)

    Col_index_num is the number...
    See more | Go to post

    Leave a comment:


  • I have just searched and found this as an answer:

    ** Edit ** Removed link to competing site

    Go into the table design and chose that yes/no field. Then click on the lookup tab and change that from text box to check box. That will take care of it....good luck.

    Hope this sorts the problem for you.
    See more | Go to post
    Last edited by NeoPa; Nov 17 '10, 05:05 PM. Reason: Removed link to competing site - Sorry Carl - Not allowed.

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    The StartTime is manually entered, however your comment did give me a lightbulb moment.

    Because data entry is such a pain at the best of times the Me.StartTime field is set with an input mask to set the : in place.

    I am fairly sure from other issues I have previously run into that input mask characters are not actually part of the data but simply displayed in the appropriate place?

    So I am guessing that this...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Just tried something and got even stranger results hopefully this may make more sense to you guys cause I just went "huh??"

    I thought that in order to test what I was trying to do I would build a query to show relevant results...
    So I loaded the table and StartTime and the put the criteria in as #12:44:00# but instead of getting the list I expected I got 0 returns. So I changed the criteria to be Like #12:44:00# which...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Thank you for your help so far...
    I have made the change as you suggested which returned as:
    0 - 12:44:00

    I was unsure if I needed to be checking for 12:44:00 or 12:44 so changed the code again slightly to allow for formating the time value:

    Code:
       times = Format(Me.StartTime, "HH:MM")
       check = DCount("[starttime]", "request", "[StartTime] = #" & times & "#")
    ...
    See more | Go to post

    Leave a comment:


  • copleyuk
    replied to How do you count time values?
    Me.StartTime is a date/time (hh:mm) format.
    See more | Go to post

    Leave a comment:


  • copleyuk
    started a topic How do you count time values?

    How do you count time values?

    Hi Everyone,

    I am trying to count the number of table entries which have the same [starttime].

    I am clearly missing something in the search criteria but cannot get the correct combination...
    Here is the code:

    Code:
    Dim check As String
    
    check = DCount("[starttime]", "request", "[StartTime] = #" & Me.StartTime & "#")
    
    MsgBox
    ...
    See more | Go to post

  • copleyuk
    replied to How do you email form values in html?
    in PHP
    Thank you soooooo much Marcus!

    Thats working perfectly!
    I've been trying to figure that out for too long.

    Thanks again

    Carl
    See more | Go to post

    Leave a comment:


  • copleyuk
    started a topic How do you email form values in html?
    in PHP

    How do you email form values in html?

    I have created a form and am emailing it via php.

    If I use plain text I can get all the entered information to email correctly. However, I wanted to have the information from the form laid out in html so that I can make it look like a completed document staff would normally see instead of just a series of lines with text.

    I have tried a number of different combinations to get this to work but am getting nowhere fast!...
    See more | Go to post

  • Spot on thanks Jim!

    Unfortunately I inherited the database with the 's already in.

    I will make sure going forward the "'s are definately not permitted!!!

    Thanks for your help you're a star
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...