User Profile

Collapse

Profile Sidebar

Collapse
computerider
computerider
Last Activity: Aug 2 '07, 12:42 AM
Joined: Feb 8 '07
Location: Raleigh, NC
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I got the code to work with this modification:

    +++++++++++++++ +++++++++++++++ +++++++++++++++ ++++++
    Private Sub Update_Click()
    Dim vInterviewee
    Dim vInterviewDate As String
    Dim strSQL
    vInterviewee = Me.Interviewee


    If IsNull(Intervie wDate) Then
    vInterviewDate = "NULL"
    Else
    vInterviewDate = "#" & CStr(InterviewD ate)...
    See more | Go to post

    Leave a comment:


  • I don't follow - the update query works well unless the date field is null then it will crash out on the db.execute line...
    See more | Go to post

    Leave a comment:


  • computerider
    started a topic SQL - how to handle NULL in a Date field

    SQL - how to handle NULL in a Date field

    The following code works great if there is a date for interview, but get an error 94, invalid use of null if date field on form is not entered (it is not required and should be null form time to time) – how do I alter the code to allow this?

    +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++
    Private Sub Update_Click()
    Dim vInterviewee
    Dim vInterviewDate As Date
    Dim strSQL
    vInterviewee = Me.Interviewee...
    See more | Go to post

  • Sorry I missed that - yes you are right I did change the listbox name to the current example...so now I am curious, are you saying that the wrong name of the listbox might still have opened the form yet had a mismatch error? I don't think so, I believe it would have debugged and opened to the list box name in the VBE, right?
    See more | Go to post

    Leave a comment:


  • I would have to say no, I changed the order several times, but if it had been the wrong column number it would not have been able to locate the correct record (which it always did)…

    The column count determines which field to match against the form’s record, so I am thinking if I had the wrong one it would have crashed...corre ct?
    See more | Go to post

    Leave a comment:


  • Thank You - I see you dim(ed) an integer AND a string which is what I thought the issue to be all along – so that makes sense – however, go figure - when I trashed the form and made a new one from scratch it works this way:
    *************** *************** *************** *************** ************
    Private Sub cmdOpenResults_ Click()
    On Error GoTo Err_cmdOpenResu lts_Click

    Dim stDocName As String
    ...
    See more | Go to post

    Leave a comment:


  • I think the number is the issue why I can't figure out BUT

    AAID is a number because in the table it looks up to it is an auto number
    Department is text

    AAID + Dept is the composite key of the table we are searching for

    The new code still produces the error msgbox...
    See more | Go to post

    Leave a comment:


  • Puppydogbuddy – your code produces the error msgbox “Type mismatch” as soon as you click the button and doesn’t open the form

    evn678 – your code does the same thing as my original code – it opens the form to the correct record but still produces the error msgbox…

    ???
    See more | Go to post

    Leave a comment:


  • Syntax issue - when strlinkcriteria is a number

    I have this code which works fine and will open the form to the correct record but it produces a "Type mismatch" msgbox on opening the record...

    the stLinkCriteria consists of two values one of which is a number [AAID] - is the syntax causing this?

    *************** *************** *************** *************** *************** *************** **
    [CODE=VB]
    Private Sub Command13_Click ()
    On Error...
    See more | Go to post
    Last edited by Denburt; May 17 '07, 07:46 PM. Reason: Code Tags

  • Well, the people have spoken! So I will say thanks to all as I head off and start making a lot of corrections!

    Appreciate the guidance!
    See more | Go to post

    Leave a comment:


  • Naming Conventions - Where do ya'll draw a line...

    This is my first access (2K) assignment with a large end user audience project (about 20 end users) for a Project Office detailing training and other data…

    my question is since I’ll have about 20 forms and 25 reports etc, etc… do you guys ALWAYS adhere to the naming convention – or do some of you feel it’s OK to leave the close buttons and the like as whatever access named them like cmd56?
    See more | Go to post

  • Bullseye - works perfect - thank you for your effort!
    See more | Go to post

    Leave a comment:


  • Combo box to search on TWO fields on a form (Access 2K)

    I have a form is based has a table with a dual primary key comprised of a Project ID# and a Department name.

    I created a combo box to search the form for a specific record - so I might be looking for record “3-Sales” but if there is a “3-Audit” it will stop at “3-Audit” because of this code:

    +++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++++++++ +++
    Private Sub cboLookUp_After Update()
    ...
    See more | Go to post

  • computerider
    started a topic copy listbox data to 2nd listbox

    copy listbox data to 2nd listbox

    i have this setup:

    1) combobox whose value filters the listbox below;

    2)listbox - values provided by a query (filtered by the combobox above)

    3) a 2nd list box which is empty

    I would like to make multiple selctions form the 1st listbox and have my choices populate the 2nd listbox - can this be done without extensive VBA code?
    See more | Go to post

  • Basing one combo box on another...how many levels can it sustain?

    I have used the example posted here from the Microsoft website:

    (http://office.microsoft.com/en-us/ac...730581033.aspx)

    but my question is if need to use this logic to drill down to a 4th level (requiring 4 combo boxes) does it work the same or will I have to begin using more extensive VBA code if I need them all on the same form [example: 1-VPs – 2-Directors 3-MGR’s – 4-Supervisors]???

    (i.e....
    See more | Go to post

  • yes but in Form view the Restore button is there and this allows a user to change the window size and see the database window behind - yes it is ONLY cosmetic as they can't do anything but it is dumb access will not allow you to stop a user from changing the form to less than maximized...it is a mystery why......
    See more | Go to post

    Leave a comment:


  • Thansk - I tried yet it still retains the dreaded restore button......
    See more | Go to post

    Leave a comment:


  • Correct - no matter what combo of settings you try, the restore button remains all by itself and it will resize the window if clicked - I have yet to find any solution - all research says its a quirk of windows so I am trying this forum......
    See more | Go to post

    Leave a comment:


  • computerider
    started a topic Please help me DESTROY the Restore button...

    Please help me DESTROY the Restore button...

    I have spent all morning on the web and no workable solution yet...I have set all props on a form yet the minimize button remains and works...how do I get it to disappear? All threads I have found have module level code yet they still fail – I am in Access 2000 if that matters…
    See more | Go to post

  • Lookup Fields and Forms - how do I control the combo box?

    I have a standard two-table structure, Orders which has a lookup field to the Salesperson table. However when you build a form the salesperson field has the combo box feature - which I WANT when adding new orders BUT NOT when viewing existing orders (because you can actually change the salesperson by using it) - I am guessing I must use code (have no idea what code) and add it to a from so I can have a View orders form (which now displays salesperson...
    See more | Go to post
No activity results to display
Show More
Working...