Search results

  1. E

    Open form based on different queries

    I’m trying to open a form based on different queries. I have an initial form (frmFlush-NS) that prompts for N or S (north/south). If I keyin “N”, I want frmFlushMH to open based on qryFlush-N; if an S is keyed, I want it to open based on qryFlush-N. I realize I can do this if I set...
  2. E

    Add AutoNumber field

    10-4 Thanks, SKK
  3. E

    Add AutoNumber field

    I have a table that I would like to add an AutoNumber Record_ID field to. However, I want the records to be number in a specific order based on a third field called ORDER. I tried alphabetizing the table based on ORDER and saving. I reopened the table and it is in the correct order. I...
  4. E

    Help clean up code

    Thank you. I will try cleaning as you noted. However, like I said, this was originally created by someone else. All I did was add the additional IF. I'm going to try creating separate code and calling it. I'm just a bit confused as how to request a specific parameter. Let me play with this...
  5. E

    Help clean up code

    I have some VB code I modified to add functionality to an older CAD routine (originally written by a consultant). The new code works fine and appears to do what I want. My question is, not being a programmer, I’m sure I did this quite primitively. I was wondering if anyone could peruse my code...
  6. E

    Strip hyphens from field

    Just a follow up. Works like a charm. Thank you...
  7. E

    Strip hyphens from field

    Excellent, I will play with this and let you know. Thanks again, SKK
  8. E

    Strip hyphens from field

    We have a database tracking construction plans. In most instances the plan number is a 6 character value displayed with hyphens: Display = 98-12-17 Field Value = 981217 I have a search criteria set as: =Left([Plan_No],2) & Mid([Plan_No],4,2) & Right([Plan_No],2) This works fine as long...
  9. E

    Open SubForm based on different queries

    Excellent Thanks Guys -- got it working. SKK
  10. E

    Open SubForm based on different queries

    I’m looking for a way to open a SubForm from different command buttons on my MasterForm where Button-A opens the SubForm with the RecordSource = Query-A, Button-B opens the same form based on Query-B. Query-A is a simple select query. Query-B is basically the same query with the addition of a...
  11. E

    Update field from a different table

    Ultimately the code will be placed on a combo box's After Update event. So, it could be a new record, but as my test, it's an existing record.
  12. E

    Update field from a different table

    I have a cmdTest button in frmPermits where I’m attempting to update the Contr_Contact field in tblPermits from data in tblContractors “Contact” field. I need to update (or insert) the data rather than simply linking it to tblContractors as we need to keep the history of who was the contact...
  13. E

    Prompt if duplication

    Ahhh... The infamous apostrophe mark -- that did it. Thank you very much Paul. Sorry for being such a pest but this will help tremendously. Thanks again, SKK
  14. E

    Prompt if duplication

    Maybe I'm asking for a bit much here but... As a test a created a TEST command button with OnClick coded as: If DCount("*", "tblPermits", "Notice_ID = " & Forms!frmPermits!txtNotice_ID) > 1 Then MsgBox "EXISTS" Else MsgBox "NOPE" End If However, I'm receiving a Run-time error 2001...
  15. E

    Prompt if duplication

    So is it coded as DLookup or DCount? I tried both but they bombed. If DLookup("Notice_ID", "tblPermits", "Me.txtNotice_ID = " & Forms!frmPermits!txtNotice_ID) > 1 Then or if DLookup("Notice_ID", "tblPermits", "Me.txtNotice_ID = " & Forms!frmPermits!txtNotice_ID) > 1 Then
  16. E

    Prompt if duplication

    I'm still a bit confused. Where/how do I place in the value I'm looking for? I tried: If DCount("Notice_ID", "tblPermits", Me.txtNotice_ID = Me.txtNotice_ID) > 1 Then
  17. E

    Prompt if duplication

    I’m trying to check if data already exists in my table. I have a couple fields that in rare instances could contain duplicate entries. However, when this is about to happen, I want to prompt the user of such. Any suggestions would be appreciated? Thanks, SKK
  18. E

    Cycle through tab order

    That did it (I probaby should have looked closer). Thank you Paul, Steve
  19. E

    Cycle through tab order

    In most instances, when tabbing through a form, after the last field is tabbed a new blank form appears. Is there a way to simply recycle through the tab order? In other words, after the last field is tabbed, it returns to the first tab field. Thanks, SKK
  20. E

    Update only current record

    Excellent - this should do it. I've got a couple things I want to add to this but it looks great. Thank you very much, SKK
Back
Top Bottom