Search results

  1. S

    IsNull/Not IsNull usage in Iif Query headache

    No problem. S.
  2. S

    Amend Cross Tab Form?

    That is OK. I believe this is not a unique problem. Everyone who uses crosstab and tries to present the result in a report has this problem. So, I hope other members in this forum may find this a useful hint. Shoji
  3. S

    IsNull/Not IsNull usage in Iif Query headache

    Hi Eqrepro, Most likely I didn't understand your question clearly. I took "the lowest number of three fields" as a cue. Yes, if any of them are null, the returned value is 0. Do you mean that if any field is null, exclude it before calculation? What if all of them are null? Anyway, if that is...
  4. S

    IsNull/Not IsNull usage in Iif Query headache

    Hi Eqrepro, You can appreciate Access's powerful Nz function. (Google it.) For example, if A is null, Nz(A,0) will return 0, otherwise A. My solution for your question (probably): PreFreezeCount = IIF(Nz(RawStrawConc, 0) < Nz(PreFreezeConc, 0), _...
  5. S

    How do I implement this VBA code? ....

    Just a thought. I use a temporary database to deal with the kind of data you are talking about. I save this temp db in the same folder as the main data db and when the front end db is opened, the first thing it does is to copy this temp file onto the user's temp folder. Yes, when the user...
  6. S

    Custom Message for Duplicate Entries

    Hi Chipster, I don't understand why you cannot use the same code for Student ID. I would write: Private Sub StudentID_BeforeUpdate(Cancel As Integer) If DCount("*", "[Student Info]", "[Student ID] = '" & Me!StudentID.Text & "'") > 0 Then MsgBox "Duplicate Student Record Found" &...
  7. S

    Amend Cross Tab Form?

    Hi Gasman, Since I am a code mania, I tend to handle this kind of situations all by code, but I would not recommend this to other people. This is what I would suggest. Crosstab queries are really powerful, but for a price. As I understand it, your problem stems from the fact that queue owners...
  8. S

    Message "Class does not support ..."

    It might be this problem: https://support.microsoft.com/en-us/kb/2640696 Use "Microsoft ActiveX Data Objects 2.8" instead, and see what happens. Shoji
  9. S

    Password Protected Forms

    Hi jcbhydro, So your idea is that 50 users will have a copy of DB on their desktop and they all enter and share the same data, hopefully synchronized quickly enough. Well, I am afraid this is not going to work. To give just one problematic scenario, suppose User A adds a new record but User B...
  10. S

    Password Protected Forms

    Hi jcbhydro, 2 questions: 1. Do those 50 Group Leaders work on the same LAN or are they located remotely? If the latter, Access may not be ideal. 2. Have you split your database into the back end (just tables) and the front end (all others)? If not, this is the first thing to do. Best, Shoji
  11. S

    Need help on Search Form using textbox and multiselect listbox

    Hi Gasman and Melissa, We want the GetList function to return a string that should look like [Sports] = 'Baseball' OR [Sports] = 'Soccer' But the result Melissa reported is like [Sports] = '1' OR [Sports] = '6' This means that the listbox's value is a number, maybe SportID. This is not good...
  12. S

    Need help on Search Form using textbox and multiselect listbox

    Hi Melissa, The reason why it is not working is because GetList function is picking the Sport ID number instead of Sport Name. First, does the field "Sports" in the tblStudent contain sport names like "Baseball" rather than SportID? Secondly, does the listbox's "Column Widths" start with 0...
  13. S

    Need help on Search Form using textbox and multiselect listbox

    One more thing: Would you insert a line like: strSports = GetList(lboSports, "Sports") MsgBox strSports If strSports <> "" Then strWHERE = strWHERE & " AND (" & strSports & ")" End If This is a test to check what is the result of GetList function. You can delete this...
  14. S

    Need help on Search Form using textbox and multiselect listbox

    What was I thinking?!! When you elaborated the list box, I should have changed the code for the function. Here is the adjusted code: Private Function GetList(lstBox As ListBox, strTargetField As String) As String ' This function will collect all the selected items from the listbox and make '...
  15. S

    Need help on Search Form using textbox and multiselect listbox

    Oops. "ctl" should be replaced with "lstBox". strTemp = strTemp & " OR Instr(1, [" & strTargetField & "], '" & _ lstBox.ItemData(varItem) & "') > 0"
  16. S

    Need help on Search Form using textbox and multiselect listbox

    Hi Melissa, This is much better. The codes I suggest below are basically the same as the first, but the difference is that sports and schools filters are OR search, therefore the GetList function is modified accordingly. You create a button "Search" and call it "cmdSearch". From the property...
  17. S

    Creating Multiple Records using button and text box to say how many to create

    Oh, I didn't see your message until now. Sorry I used ADO which is not the default library. I will use DAO instead this time. You don't have to add any new library. My DAO is a bit rusty, but I hope this does not include any errors. Private Sub CreateButton_Click() Dim db As Database Dim rs As...
  18. S

    Need help on Search Form using textbox and multiselect listbox

    Hi Gasman, Your points are well taken. If I were Melissa, I would reconsider the search style. But I would like to know what this search is trying to do first. As I asked in my previous message, "Sports" field may be a problem if it contains more than one sport. If possible, I would re-design...
  19. S

    Need help on Search Form using textbox and multiselect listbox

    Hi Melissa, Before I get to your question, I wonder how this search form works. For example, are the text boxes for Firsname and Lastname to identify a particular individual or to find how many, say, "Jane"s are in such-and-such sports? If it is the former, have you considered creating the...
Back
Top Bottom