Search results

  1. H

    Open form and setfocus to specific control

    I had to do a similar thing and accomplished it through a function: Public Sub CloseAndOpen(frmparm) Dim CloseObj As String Dim OpenObj As String CloseObj = Mid(frmparm, 1, InStr(1, frmparm, ",") - 1) OpenObj = Mid(frmparm, InStr(1, frmparm, ",") + 1) If CloseObj <>...
  2. H

    Remove column from form

    That was it. Thanks.
  3. H

    Remove column from form

    See attached...
  4. H

    Remove column from form

    I have a multiple record form that displays fine. However, on the left hand side there is a column that when a record is selected, an arrow appears there. I don't know what this is called in order to suppress it. Help please?
  5. H

    Vary combobox options?

    My pleasure. You should mark this as solved (assuming it is) and click the Thanks button on the responses.
  6. H

    Vary combobox options?

    adh123 - did what I say make sense to you? RainLover - I hear you. After more than 30 years of coding, I have learned that the more that I can build into the data and relationships the easier the coding and maintenance of code becomes. I always build referential integrity into my DBs so the DB...
  7. H

    Vary combobox options?

    The problem with doing it in code is what if they add another status in the future or change which statuses a particular userid should see? You will constantly be editing code. By keeping it all in tables and relating the data in those tables, you just add or delete or modify records in a...
  8. H

    Vary combobox options?

    Should have said there NO If statements at all.
  9. H

    Vary combobox options?

    See the DB I attached in earlier post. There are If statements at all. Everything is driven by the tables and the relationships defined in the tables. Then, when you do the join with selection criteria of a single userid, you obtain the subset of statuses that you want to display in the...
  10. H

    Vary combobox options?

    I disagree with the way you are going about this. It should ALL be table driven, not code driven. I am attaching a sample DB. When you change the criteria on the join in the query, the contents of the combobox will change as well.
  11. H

    Vary combobox options?

    One table is just your users. One table should just be your options. A third table that relates your users to options (one option on each record so you would have 3 entries for user 1, 2 entries for user 2, etc. Create a query that returns the options for a given user. Let that query be the...
  12. H

    Datasheet mode form for both data entry and data retrieval

    I ended up changing it to a continuous form. Too many restrictions on datasheet mode.
  13. H

    Datasheet mode form for both data entry and data retrieval

    I guess I thought that when you change the enabled and/or locked values that they did carry over. I presume from your answer that this is not the case?
  14. H

    Vary combobox options?

    If all of your options for different statuses are sequential (it sounds like they are) then you can build a table that for a given status gives a beginning and ending option. Using that lookup table you should be able to build a query that pulls the starting and ending option as criteria...
  15. H

    Datasheet mode form for both data entry and data retrieval

    I want to use the same form in datasheet mode for data entry and retrieval. When retrieving, all controls are disabled and locked. I am trying to enable and unlock them for modifying but that isn't working. What am I doing wrong? <code> DoCmd.OpenForm "PO_Practice Data", , , , acFormEdit...
  16. H

    Form to display subset of records in datasheet mode

    I got it. Instead of building a recordset, I changed it to build a query. Then I set the recordset on the form to the query. Based on the lookup form, the parameters of the query change to determine the subset of the original data, but the form always references the query.
  17. H

    Form to display subset of records in datasheet mode

    I created a form to enter the lookup data and build the SQL string to create a recordset in VBA that is a subset of the original data. Using the Form wizard I created a form that displays ALL of the records in that original table (actually a QUERY). What I want to do is open this second form but...
  18. H

    Check if a field exists in another table

    I have a query where I want to check if a value of one field exists in another table. If it does, I want to set a value to True and if not set it to False. What is the easiest way to do this? Thanks.
  19. H

    Error 2501 on output to PDF

    I found the problem but I don't understand why it works sometimes and doesn't work other times. I was building the filename based on the contents of a field in the DB. Sometimes the field contains an apostrophe ('). I changed the filename to just a dummy name and it works fine now.
  20. H

    Error 2501 on output to PDF

    A little more info... When the VBA code generates the error (and I have the Print Preview window still open), if I right-click export to PDF the file created has all #ERROR for all of the fields (even though it had data in the Print Preview... However, if I End the debug and just display the...
Back
Top Bottom