Search results

  1. S

    Solved Form Validation and Form-to-Form data

    Edit: See missinglinq's post about validating the data. You can pass this data to another form in the OpenArgs as describe by pbaldy here. But this procedure sounds strange. Why not entered the data directly in form B. and unless the CollectionDate is a foreign key it should not be...
  2. S

    How to pass empty criteria in a query

    I think this could be simplified by using the IIF function directly in the WHERE clause rather than using it to create a field.
  3. S

    How to pass empty criteria in a query

    Also are you using an empty string as a data value? If so why?
  4. S

    How to pass empty criteria in a query

    It's still not clear to me what you want but if you want the query to act differently depending on the value of p_cluster then you could try using the IIF function to distinguish the cases. I'll give you some examples of this if you show me examples of what kind of output you want for the...
  5. S

    How to pass empty criteria in a query

    I don't understand why IS NULL isn't working for you or perhaps I don't understand what you are trying to do. Could you post the query and the rest of the code and an example of the output you are trying to get?
  6. S

    Get Folder Names

    I'm not sure want you want but if you want to list the subfolders in a folder then I think something like this does it: Private Sub ListFolders(strFolder As String) ' use Microsoft Scripting Runtime for early binding 'Dim fso As FileSystemObject 'Dim RootFolder As Folder 'Dim fdr As Folder...
  7. S

    Passing combobox value from one form to a combobox of another form

    It looks like what you have should work. Are you sure the Else part of the If-Then-Else is being executed. If not I suggest putting in a stop and stepping through it or put Debug.Print "The main form is" & (Me.OpenArgs) in the Else part to check this. Also Debug.Print "The first item is...
  8. S

    Temp tables...who needs them?

    Yeah I've been there. What should be call these? Ambivalent epiphanies? This has happen a few times because of contributions of members on this forum. This simultaneous feeling of enlightenment and stupidity makes me want to hate the people that caused the condition. It's a nasty emotional...
  9. S

    Code to check if entry is in the right format

    dedjloco uploaded his database in post 11 of this thread. It's interesting. I didn't dig into it much but I suspect it could be simplified.
  10. S

    Code to check if entry is in the right format

    Sorry didn't see the Not. I suggest you add Debug.Print Me.Project_Text Debug.Print Me.Project_Text Like "P###?###" before the if and post what you are getting in the Immediate Window The variable NewData is being inserted in this function. Have you tried NewData = UCASE(NewData) before...
  11. S

    Create Form with OnClose Sub

    Have you tried CreateEventProc?
  12. S

    Code to check if entry is in the right format

    The condition in the elseif looks the same as the condition in the if. You would want them to be different. As for the side question I believe StrConv will do what you want.
  13. S

    Passing combobox value from one form to a combobox of another form

    Sorry I misread you post and assumed a listbox which make my suggestion in post #2 bogus. To set a combo box to a value in its list you need to set the combo box to the desired value in the bound column. I have a working example in the attached database. The code in the buttons is...
  14. S

    count subform records exclude duplicates

    Assuming you just wanted to know the unique number of product types and put that in the NrofProducts_Text textbox then you could do that with the following code in a command button or other event. Dim rs As DAO.Recordset Dim strSQL As String strSQL = "SELECT DISTINCT [Product type] FROM...
  15. S

    count subform records exclude duplicates

    I need to know what is considered a duplicate. I was assuming you meant that all of the fields were the same, but now that I look at it that doesn't seem likely. Do you want a count of the unique products, i.e., only count BH, RL, KB, etc once or is it a combination of fields?
  16. S

    count subform records exclude duplicates

    Since you want a count of the distinct records in the subform's filtered record source I think that in order to use DCount you would have to extract the subform's record source, create a querydef from it, modify the SQL of the querydef to include the filters and the DISTINCT keyword and run...
  17. S

    Populating a field in one table based on multiple fields in another

    Could you upload your database or give us a screen shot of your relationships. With that I think I can explain how you would create the query that would get number of people that lived in AreaOne for example. Also if you don't understand database normalization then I suggest checking out this...
  18. S

    ILF() function

    Then I agree with plog and suggest you ensure the structure is correct before proceeding with this. I suggest checking out this series of pages on normalization. If there are a lot of records and you need some code to move the data from the columns from the fields BC_1, BC_2, ...etc to another...
  19. S

    Populating a field in one table based on multiple fields in another

    No this would just populate the textbox; however, if the textbox is bound to a field in the People table then it would be saved (written) along with the other data that was entered into the form. I suggest that you consider whether you should store it in the People table. If the Area is...
  20. S

    ILF() function

    What if it has SDGL but not 33? Should it be blank or SDGL? What's the rule? Is it for example, If 33 then whatever follows it otherwise null? And now for the important question. Is Bindingen a multivalued field, just a plain text field that happens to have comma separated values, or...
Back
Top Bottom