Search results

  1. D

    conversion failed when converting varchar value to int

    Thanks LPurvis .. yes is an adp hitting sql backend.. I had this working as an access db but have a user defined function that i need to specify as query criteria and found out tis not supported.. typical!.. so having to convert to adp and sql db.... nice one thanks will give this a go when...
  2. D

    conversion failed when converting varchar value to int

    sorry 4 the double post i keep getting white screen on post of quick reply!
  3. D

    conversion failed when converting varchar value to int

    Hi DC.. Thanks for the prompt response.. further... I do not wish to convert the '123XXX' string to integer but to simply compare it against my fields in the database ie. if [ID] & [BR] & [JO] & [CO] & [SI] = [ID] & [BRANCH] & [JOB TYPE] & [COMPANY NAME]& [SITE LOCATION] then .... My ID field...
  4. D

    conversion failed when converting varchar value to int

    Hi DC.. thank for the prompt response.. I don't want to convert '123string' to integer... I just want to select record based on comparision of my text boxes [ID] [BR] [JO] [CO] [SI] and the fields in my table [ID] [BRANCH] [JOB TYPE] [COMPANY NAME] [SITE LOCATION] My [ID] field is an integer...
  5. D

    conversion failed when converting varchar value to int

    Hi hoping someone may be able to help.. I'm getting this error on a sql select statement conversion failed when converting varchar '433salisburydelivernjhnj' value to int my sql skills are somewhat basic.. here's what i have Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset Dim s As...
  6. D

    is it possible to auto adjust the height in the table?

    Thanks for your thoughts.. ok here's a bit more detail on what i'm trying to setup... I have main form with calendar control with a subform that is set to datasheet mode... clicking the calendar date shows the jobs entered for that date in the subform.. 1 field in my table can contain large...
  7. D

    is it possible to auto adjust the height in the table?

    I really need to perform this function as well.. are there any active x controls / any other ways to get dynamic row height to work in access.... I cannot use a report as i must use a form as the data is driven by a control on my main form... and hence must be embeded... This seems such a basic...
  8. D

    check for duplicate records using text boxes

    thanks ..lagbolt .. works a charm!
  9. D

    check for duplicate records using text boxes

    well i click the command button i have set this code on, to check for the duplicate then it allows the add record even though i have created a duplicate of the values for testing purposes... so I'm figure the select query is not setting rst with the correct values.. ie maybe my syntax for the...
  10. D

    check for duplicate records using text boxes

    Hi .. I have a few text boxes on my form that I would like to check for duplicates before adding a record.. I managed to cobble the code below togther but think there is a problem in my sql... can anyone suggest a possible solution Dim Rst As Recordset Dim S As String S = Me![ID] & Me![BR] &...
  11. D

    Please Help: Browse to Record VBA

    solved thanks Kafrin... set job date field back to a text only field and used code below Private Sub Calendar5_Click() Me![JD] = Me!Calendar5.Value Me![NBD] = GetBusinessDay([JD], 1, "23456", 1, "Holidays", "Holiday Dates") Me.Refresh Dim rs As DAO.Recordset Set rs = Me.Recordset.Clone If...
  12. D

    Please Help: Browse to Record VBA

    thanks kafrin.. nailed it finally using code below. you were right.. but instead i just set the field to a text value in the table rather than use the code above.. nice one thanks! Dim rs As DAO.Recordset Set rs = Me.Recordset.Clone If rs.BOF And rs.EOF Then rs.AddNew rs![Job Date] =...
  13. D

    Please Help: Browse to Record VBA

    Nailed it finally to anyone thats interested : thanks kafrin for the help Private Sub Calendar5_Click() Me![JD] = Me!Calendar5.Value Me![NBD] = GetBusinessDay([JD], 1, "23456", 1, "Holidays", "Holiday Dates") Me.Refresh Dim rs As DAO.Recordset Set rs = Me.Recordset.Clone If rs.BOF And rs.EOF...
  14. D

    Please Help: Browse to Record VBA

    Hi Kafrin.. thanks for the tip actually had just been looking at it this way.. code I have is shown below but at .NoMatch (add a new record). I'm getting errors relating to duplicating my indexed record (job date)... any suggestions? Dim rs As Object Set rs = Me.Recordset.Clone If rs.BOF And...
  15. D

    Please Help: Browse to Record VBA

    Hi.. I really need some help with my desperate vba skills!. When I click a date on the calendar control on my form a new record is added to the database, this works great. Trouble I have is when I click a date I have already entered I am trying to get the database to retrieve the record and...
  16. D

    Browse/add record based on Calendar

    Hi .. Ive been playing around and nearly there but keep getting a no current record error when i hit rs.movenext can anyone suggest a possible fix? Private Sub Calendar5_Click() Me.Dirty = False Me![JD] = Me!Calendar5.Value Me![JD].Requery Me![NBD] = GetBusinessDay([JD], 1, "23456", 1...
  17. D

    Browse/add record based on Calendar

    think I'm way off here but this is what I have so far when the calendar is clicked.. get sql errros.. Private Sub Calendar5_Click() Me![Job Date] = Me!Calendar5.Value Me![Job Date].Requery Me![NextBusinessDay] = GetBusinessDay([Job Date], 1, "23456", 1, "Holidays", "Holiday Dates") Me.Refresh...
  18. D

    calculate next business day excluding holidays

    thanks guys... for some reason i didn't get a notification of the replies to this post? Thanks for your help..anyway.. i managed to do this via Function GetBusinessDay(FromDate As Date, Offset As Long, Optional WorkDays As String = "23456", _ Optional ZeroOffsetBehavior As Long = 1...
  19. D

    Browse/add record based on Calendar

    what I have currently ..attached
  20. D

    Browse/add record based on Calendar

    Hi.. hoping someone may be able to help What I am attempting to do is create a schedule database for our daily jobs.. My question relates to the calendar active x control. Currently when I click the calendar it updates my job date field and finds the next working day excluding a list of...
Back
Top Bottom