Search results

  1. T

    How to say if a cbo is empty or null? (Or what?)

    This is the code: Private Sub Form_Open(Cancel As Integer) If DCount("*", "SELECT tblCarManuals.ManualNo, tblCarManuals.CarID FROM tblCarManuals WHERE (((tblCarManuals.ManualNo) Is Not Null)) AND tblCarManuals.CarID=qryAllBase.CarID ORDER BY tblCarManuals.ManualNo;") < 1 Then...
  2. T

    How to say if a cbo is empty or null? (Or what?)

    Already posted it, 4 or 5 messages above :) I thought you'd noticed it.
  3. T

    How to say if a cbo is empty or null? (Or what?)

    Yes but just counting rows won't do any good in my example because I want to check if SOME rows are loaded in the cbo, related only to, say, the Car1, item, in the example above. The source for the cbo is a table containing hundreds of records, for all available Cars, in the same example. When...
  4. T

    How to say if a cbo is empty or null? (Or what?)

    I even tried to load the SQL statement to a hidden ListBox and then check if this ListBox IsNull in order to paint cbo RED, but it seems ListBoxes are not "null" either...
  5. T

    How to say if a cbo is empty or null? (Or what?)

    Run-time error 3078: The Microsoft Office Access database cannot find the input table or query "SELECT......"... I just want to check on form load if cbo is loaded with values. If yes, RED, if no, WHITE.
  6. T

    How to say if a cbo is empty or null? (Or what?)

    I was trying to use something like (lucky guesses): If cbo IsNull then cbo.BackColor = xxxx but it doesn't work. Cbos aren't null? The same goes with IsEmpty.
  7. T

    How to say if a cbo is empty or null? (Or what?)

    It's my fault that I oversimplified my problem. Real-case scenario is this (still simplified for clarity reasons, but not as much as before): I have form1. When it loads, there is already a filter to load a previously clicked item through a list, say Car1. In a previous form, there is a list...
  8. T

    How to say if a cbo is empty or null? (Or what?)

    Hi, I have a form, form1. Inside there is a combo box, cbo1, that gets its values from table1. On form load, I want an expression that checks if table1 has any values to "send" to cbo1. If yes, meaning, if after form loads cbo1 is loaded with table1's values, I want cbo1 colored RED, if not...
  9. T

    Conditional formatting help (vba)

    Never mind, I did it. On Form Load, I set these parameters: If Not IsNull(fieldA) Then Me.tbo1.BackColor = vbYellow End If Then, in the tbo1 textbox I set the following OnClickevent: If Not IsNull(fieldA) And Me.tbo1 = "xxxxx" Then DoCmd.OpenForm "Form2" End If
  10. T

    Conditional formatting help (vba)

    Hi, I have a textbox (say tbo1) in a form and what I want to do is this: If tableA.fieldA IsNot Null Then Make tbo1 background fill=Red and OnClick open Form2 What's the proper syntax in VBA? Thanks in advance!
  11. T

    Problem with IF... THEN expression

    Hi, I would kindly ask for your help in the following expression problem: I have Form A, with two text boxes, tbo1 and tbo2. Form A gets its values from query A that has two fields, field A and field B. What I want to do is this: If tbo1 equals "YYY" then tbo equals field A. I have no...
  12. T

    Send records to new form by double-clicking in a listbox

    Ok, great! From now on, I only need to find a way NOT to populate the listbox when the main form loads, in order to prevent the user from double-clicking on a record while the above combo boxes are nulls and nothing happens. I believe I can find a way, again, thank you very much, and...
  13. T

    Send records to new form by double-clicking in a listbox

    Hi JHB, Well...!!! The marvels of the Internet. The only thing that puzzles me now is that for the new form to load, BOTH cboCatID AND subCatID combos MUST have a value. They can't be blank. If so, double-click returns an error. Could we bypass this, somehow?? A million thanks!
  14. T

    Send records to new form by double-clicking in a listbox

    Any more help, please??
  15. T

    Send records to new form by double-clicking in a listbox

    Thanks. CatID and SubCatID (and cboCatID and cboSubCatID respectively) are the cascading combo boxes that filter information down to the lstTypeID listbox. So the listbox in which certain criteria should be met is the lstTypeID. Your instructions give me this error: "Access can't find the...
  16. T

    Send records to new form by double-clicking in a listbox

    Hi all, I'm in desperate need of a (simple I guess) code to allow me to send records from my listbox to a new form. Scenario goes as follows: I use cascading combo boxes to narrow my available choices and finally end up with a listbox presenting the records filtered through cascading process...
Back
Top Bottom