User Profile

Collapse

Profile Sidebar

Collapse
sweeneye
sweeneye
Last Activity: May 2 '08, 03:38 PM
Joined: Nov 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • This little bit of programming has caused me more stress!!! I finally found out my problem and its one of those stupid little things, the code should have looked like this:

    Code:
    SELECT Table1.[IMP/IMPex], Table1.[LSM/OCR]
    
    FROM Table1
    
    WHERE ((Forms![Query Form]![IMP/IMPexquery] Is Null) 
    Or (Forms![Query Form]![IMP/IMPexquery]=Table1.[IMP/IMPex])) 
    And ((Forms![Query Form]!LSMquery Is Null)
    ...
    See more | Go to post

    Leave a comment:


  • I think i found the problem, when i looked at the SQL in design view it showed this:



    it doesent seem to be linking the parameters properly, instead it creates new ones that dont work as proper AND statements!!

    oh well, it looked so nice in SQL...
    See more | Go to post

    Leave a comment:


  • Tried that and its great to make some progress but its a killed when it all falls apart!!! (excuse me for using the actual code and not the simpler examples i had been using)


    Code:
    WHERE (((Forms![Query Form]![IMP/IMPexquery] Is Null)
     Or (Forms![Query Form]![IMP/IMPexquery]= Table1.[IMP/IMPex])))
    worked great, picked only yes when ticked, only no when unticked and both when null so i tried to add an and statement...
    See more | Go to post

    Leave a comment:


  • wow it took me so long to write that and other distractions there are two more replys, it looks promissing and I will give it a try, thanks
    See more | Go to post

    Leave a comment:


  • I hate asking more because you have provided me with so much help today so if you want to leave this to someone else you can!

    I have two problems:

    1:
    despite using the function as you gave me exactly in Access Class Objects, I get the following error message:

    Undefined function <name> in expression. (Error 3085)
    You entered an SQL expression that includes a Function procedure name that...
    See more | Go to post

    Leave a comment:


  • So with the new Public Function:

    Code:
    WHERE (IF Formfieldvalue("Query Form", "Monitor tick") <> IS Null THEN (Table1.[Monitor])=Formfieldvalue("Query Form", "Monitor tick"));
    Not being a big SQL user am I right in using logic here inside a WHERE statement or am I again going down the wrong track!
    See more | Go to post

    Leave a comment:


  • OK, thanks, I'm smacking my head in disgust!!! I wrote the SQL ages ago and came back to it recently and realised I had been asking it to do something stupid by basically saying where field 'x' (which is a yes or no) is equal to null

    what I thought i was saying was include this field if the tick box is equal to null, i'll have another look at it
    See more | Go to post

    Leave a comment:


  • Thanks for the advice on using form fields as query values, that was something that I refused to belive wouldn't work but I guess sometimes even in programmes like Access there can be bugs like that!

    Anyway, I didn't give any thought to the data type of the fields. I just inserted check boxes, named them appropriately and in the properties of the check box I changed the vale 'triple state' to yes, assuming this gave me a variable that...
    See more | Go to post

    Leave a comment:


  • Search form with multiple tick boxes wont ignore unticked boxes

    Hi,

    I'm basing a query on the variables used in a form. The database contains lots of problems, say with a computer and a tick box for the apropriate component like monitor, keyboard, mouse etc. and each has several eg problem 1 has a monitor and mouse problem

    My form then has what to look for tick boxes (tri-state) for each of these. I want my query to include all monitor problems when that is ticked and all monitor...
    See more | Go to post

  • sweeneye
    replied to Very simple noobie question!
    ok, in case it helps anyone else, i found out for myself what to do!

    --> create new query like 'edit name' and a for like 'edit name form' etc.

    get the list with all the names to be bound to the name id by including it in the properties and setting Name ID as the bound column

    in the query set the criteria for the Name ID as the function for Name ID and in the form edit name, set record source as the...
    See more | Go to post

    Leave a comment:


  • sweeneye
    replied to Very simple noobie question!
    just to clarify with a bit more looking at this, the list box is bound to the name ID, i'm assumign i'll have to include a query for the next part?

    if it helps, i am using access 2002
    See more | Go to post

    Leave a comment:


  • sweeneye
    started a topic Very simple noobie question!

    Very simple noobie question!

    its the most basic thing in the world but im just getting started with access and VB, i am more used to C++ but still a bit hazy on that too, anyway its a simple names database which to start with we will say has the fields:

    first name
    second name
    department

    i have a form with two buttons, add and edit, (add i can handle) when you click edit, i have a listbox that pops up with the names, i want to be able...
    See more | Go to post
No activity results to display
Show More
Working...