Search results

  1. E

    Criteria for an IIF Statement.

    I'm glad you found a solution - however, you certainly CAN use criteria for IIF statements. Did you add the quotes around the "True" criteria statement?
  2. E

    Error in Query in Expression Builder...

    Should there be a space in [T YPGESS]? You have no space the first time you use it, and a space the second time.
  3. E

    Criteria for an IIF Statement.

    I assume you are using the Query builder. Just put "True" in under the criteria for that column.
  4. E

    Hide Combobox on Continuous Form

    I know this.... but I've also seen some pretty clever solutions to doing things like highligting every other record, and conditional formatting, so I'm hoping...
  5. E

    Hide Combobox on Continuous Form

    I do not like the look of combo boxes on continuous forms. I think that they really take away from an aesthetic I am trying to create. However, I really like their functionality. What I would like to do is have a text box for the field when the control does not have focus, but switch it to a...
  6. E

    How do you change the "Default" Properties of TextBox control

    I create an AutoFormat for each database I do. I define my colors, my borders, my styles, etc. Then I just autoformat each form with my new style when I create it, and anything I add follows my style.
  7. E

    Detecting the current year?

    And hey, if you want to get crazy you could use DatePart("YYYY", Date)
  8. E

    setfocus

    Public Sub check_states(ControlName As String, FormName as String) Dim states As String Dim compare_val As Integer If Not IsNull(variable) Then states = "AL AK CO CT DE FL GA HI ID MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PW PA TX UT VT VI VA WA WI" compare_val = InStr(1, states, variable, 1)...
  9. E

    Display query results in a form

    You can use the DLookUp function to look up the value in a query to table based certain criteria.
  10. E

    Recordset Query

    You would add the extra line of code right under Set rstContacts = Me.Recordset
  11. E

    Searching equal records

    Not sure I understand... the query I posted will put each record that LastName in a new table if it exists in both tables. Is this not what you need to do?
  12. E

    Problem with recordset (fieldname = variable)

    Hmmm, I think I'm still missing the boat - sorry! Do you have an example that you could post?
  13. E

    Problem with recordset (fieldname = variable)

    grnzbra, I'm not sure what you are asking...
  14. E

    Problem with recordset (fieldname = variable)

    OK, No idea if this is the "right" way to do it, but it will work... Sub FLogin(tablename, user, computer, InOut, type) Dim rslogin As DAO.Recordset Dim iUserField as integer, iComputerField as integer, iInOutField as integer Set rslogin = CurrentDb.OpenRecordset(tablename, dbOpenDynaset) For...
  15. E

    Nulls and zeros in calculations

    Try using the NZ function. It will turn nulls into zeros. Look it up in Access help for more info.
  16. E

    Traumatized by killer NESTED IIFs

    Glad to help - I think that the + function is very under-utilized, especially since it can simplifly things so much!
  17. E

    Want to add query result in a form

    The syntax for DLookUp is as follows: =DLookUp("FieldName", "QueryName", "OtherField = " & SomeValue) It would go in the ControlSource of a textbox. If the "OtherField" is a text field, you'll need to add quotes: =DLookUp("FieldName", "QueryName", "OtherField = '" & SomeValue & "'") The...
  18. E

    Recordset Query

    I'm still a bit confused. I'm not sure what you mean when you say you have three forms... do you mean 3 records? And when you hit the export button you only want to export records that have the same thing in the combo box as the record you are currently on? If that is the case, you need to...
  19. E

    Using access query in visual basic?

    The difference between DLookup and DMax is that DLookup will return the first value it finds that meets the criteria, while DMax will return the maximum. The reason I had you use Dlookup was because your query was only returning one result. Dmax should also work. Alternativley, you could get rid...
  20. E

    Traumatized by killer NESTED IIFs

    No no - all you need is the one line I gave you. You can get rid of all that other code... The + removes the need to use Ifs (or Switch) to test for nulls. Give it a shot!
Back
Top Bottom