Search results

  1. H

    Column Name based on value in another table

    Thanks you everyone's help. From my research and what everyone has said, naming a column in a header based on a value in another table is not possible.
  2. H

    Column Name based on value in another table

    The data in the column is an equation based on the number of vehicles in another table. The users would like to have the number of vehicles used in the equation shown in the header. Either would work
  3. H

    Column Name based on value in another table

    I've searched around a bit but I can't find an answer. Is it possible to name a column in a table based on a value in another table?
  4. H

    update the id number so there is no duplicates

    I have a table that has duplicate numbers in the ID column and I want to get rid of them. When I first populate the table I need to have duplicate numbers since I run some code that breaks part of the records into two. After I'm done with that I need to change the ID field so they are all...
  5. H

    Delete records based on criteria

    I'm trying to clean some records that have part numbers, category number, service type, and etc. I trying to write some vba that will delete a record based on two or more rows . The example below is scaled down. For every duplicate part number I want to delete the record if category1 and...
  6. H

    Password error handling

    I got rid of the Cancel argument and used closed. Thank you
  7. H

    Password error handling

    I placed an error handler on the FormA but now the FormB opens. How do I stop FormB from opening? Is there an easier way to password protect a form?
  8. H

    Password error handling

    I have a password protecting a form when it opens. That part works, the problem is I get a error if the user hits the cancel button or the wrong password is given. I get a run-time error '2501': The OpenForm action was canceled. The msgbox is opening before the error message opens. The...
  9. H

    Query won't sort based on form combo box

    It feels like I'm trying to do too much with the search and I think the solution is I have to have a the search with the text box on one form and the combo box on another form. Thank you for your help.
  10. H

    Query won't sort based on form combo box

    Gasman- I tried the code and it did not work. Meaning when I have selected an item in the combo box and rerun the query the selection is not filtered. When the combo box value is null and I type something in the text box the query reflects the search.
  11. H

    Query won't sort based on form combo box

    Sorry for being a pain. This seems too small of a problem to have. when I do a query just based on the combo box it works. But it does not work when I hard code the combo box. I even tried moving the location of the combo box in the WHERE statement.
  12. H

    Query won't sort based on form combo box

    I have not tried hardcoding the values, since the values will change with the data. The values in the combo box are text (there are some numbers but they always follow letters).
  13. H

    Query won't sort based on form combo box

    I have a query that uses a text box and a combo box from a form to filter the data. I'm using the query to export the data to an excel. The query works when it is filtered by the text box but it does not work when I use the combo box. SELECT SearchAll_qry.ID, SearchAll_qry.[Alpha...
  14. H

    Pass text box value to new record on another form

    Thanks for you help. It works, I changed the code to: Private Sub Form_Open(Cancel As Integer) If Not IsNull(Me.OpenArgs) Then DoCmd.GoToRecord , , acNewRec Me.txtProgramName = Me.OpenArgs End If End Sub
  15. H

    Pass text box value to new record on another form

    Yes, it's going through the If/Then block properly. I tried the OpenArgs from some examples I found but now I'm getting an "You can't assign a value to this object" error. Below is what I changed my code to. The code for the if: Private Sub txtYesNo_AfterUpdate() If Me.txtYesNo.Value...
  16. H

    Pass text box value to new record on another form

    Thank you but it's still not copying the Program name from frm_1 into the frm_2 Program Name field in the new record.
  17. H

    Pass text box value to new record on another form

    I have a form (frm_1) that has an event if the txtbox value equals "no", then it opens another form (frm_2) on new record. Private Sub txtYesNo_AfterUpdate() If Me.txtYesNo.Value = "no" Then DoCmd.OpenForm "LatePR_frm", , , , acFormAdd End If End Sub frm_2 opens on a new...
  18. H

    Renaming exported query

    I have a button that exports a query to an excel. The issue is the name of the query is in the file name. Is there a way the user has to enter a file name? My code is: Private Sub BtnExport_Click() On Error GoTo Err_Handler DoCmd.Requery (ListboxExport_qry) DoCmd.OutputTo...
  19. H

    Text and combo boxes

    It's always populated. when I selected an item in the combo box it requerys.
  20. H

    Text and combo boxes

    Yes, the name of the text box is Me.txtNSP. It is located on the parent form. The code for the text box is: Private Sub TxtbxNSN_AfterUpdate() Me.SubMaster_Totals_frm.Form.Filter = "[NSP] Like '*" & (Me.TxtbxNSP) & "*'" Me.SubMaster_Totals_frm.Form.FilterOn = True...
Top Bottom