Recent content by TylerTand

  1. T

    Create multiple records in subform and pre-populate each record

    Start out with an if statement to check if the objective has any activities. if the result is true then do updates to the fields with the intended message. (you didn't say what that was) otherwise it means that there are no activities for that objective and you need to create three new records...
  2. T

    how to update two table

    First off there is no such thing as a sub table. You can have a sub form but not a sub table. I am assuming that the main form and the sub form have two different tables as their recordsources. No offense but your code is a little hard to follow can you tell us what you are trying to do, not...
  3. T

    Create a new label on Access Report programatically

    Why do you need to create a label through VBA? If you want to be able to change the text of the label I would suggest using an unbound text box and then set the recordsource of the box to display what ever you want. Can you explain what you are trying to do and why? This helps alot in giving...
  4. T

    Basic String manipulation question

    Your question is a little confusing. Can you try and explain what it is that you are trying to do. If you are just trying to concatenate the variable strValue and the word hello in a text box than you can just set the form's on open event procedure and define strvalue and say Dim strValue...
  5. T

    NEED HELP! Adding row to table using VB

    O.K. post what you have an we'll see what we can do to fix the problem. Tyler
  6. T

    NEED HELP! Adding row to table using VB

    You have a lot of inner joins. This is probably your problem. When you drag a link between two tables in the query design view you automatically create an inner join. This type of join means you only want records where the values in the two tables are the same. Here is an example of when you...
  7. T

    NEED HELP! Adding row to table using VB

    No Problem glad to help. You were correct, your problem lies in your where clause. Try to remember that when you write the SQL statement in the code that it is a string. It begings docmd.runsql "". Notice how the actual sql statement is in double quotes, thus a string. If you want to put a...
  8. T

    NEED HELP! Adding row to table using VB

    Your Welcome! I have not had to do the refresh method before because in my database when I am done with a form I close it. So you may have to try out a couple of things. First off in your three examples you included I hope that the code was preceded by an 'if' ? If not then this is your...
  9. T

    NEED HELP! Adding row to table using VB

    I'm still learning to so here was my mistake number one: Set NameCheck= currentdb.openrecordset("Select [Company Wells Database].* from [Company Wells Database] WHERE [Company Wells Database].[Well Name- #]=me![txtAddWellName];",2) Should Read: Set NameCheck=...
  10. T

    DB security

    I am a little confused at your question. Your code suggests that you have a table named "tbl_security" and you are doing a lookup to see if user is in this table. Is your intent to prevent access to the database completely if the user doesn't have an account in your table? If so then you can...
  11. T

    NEED HELP! Adding row to table using VB

    #1 Set NameCheck= currentdb.openrecordset("Select [Company Wells Database].* from [Company Wells Database] WHERE [Company Wells Database].[Well Name- #]=me![txtAddWellName];",2) if NameCheck.eof then 'Put your code to add the new Well Name here else msgbox " This well Name is already in the...
  12. T

    Adding new record to database - overwriting first record

    Maybe this is too simple but why don't you have your form set to Data Entry to Yes. This will automatically add the new data to the linked table. If you want to add a new set of data you can have a button with the code me!Requery This will requery the form and allow you to enter the next set...
  13. T

    NEED HELP! Adding row to table using VB

    If I get this right all you want to do is add the Name of a new Well that is inputted through a text box into a Table? From you code it looks like the Table to be added to is called: Wells I don't see what the text box on the form is Named so I am going to call it: [text5] Set Varset=...
  14. T

    Close external program

    I have multiple copies of my database at different locations I can successfully use the following piece of code at my home location but at another location it doesn't work killString = "taskkill /F /IM zapgrab2.exe" Call Shell(killString, vbHide) This stops a program named Zapgrab Is...
  15. T

    Close external program

    I am using Access 2003 and need a piece of code that will close an externally running program. I use a Shell command to open the program but I can't find any help on closing or killing an external program to Access. You help is greatly appreciated Tyler
Top Bottom