Search results

  1. B

    Text file Import: only 25 rows available

    We are trying to import a text file. We are having two problems. First a little history about the text file: The text file contains results of a lab test. The data of interest does not appear before row 50 of the text file. The text import wizard in access does not show any rows after row 25...
  2. B

    use variable as reference in vba select statement

    I am trying to use the variable strTest as a variable in the select statement below. The fields in the custody database contain F8 thru F34. Private Sub txtMethod_BeforeUpdate(Cancel As Integer) strA = 8 Do While strA < 35 strTest = "F" + strA Set dbs = CurrentDb Set rst =...
  3. B

    Pass a variable from form code to vba macro code.

    How can one pass a variable form form code to macro code. StrA is a variable with the value of 8 used in the vba code of a form - frmCustody We have a macro called Test how can macro test run the line: MsgBox strA and have the value 8 appear in the message box. Thanks, B
  4. B

    Changing form values from a macro

    I have written the following macro that is in module 1. Sub Test() DoCmd.SelectObject acForm, "frmCustody" frmCustody.Me.Controls("F9").Value = "Ag" End Sub I get the following error: Object required. Any ideas how to get the value to show up in the form when the macro runs?? Thanks, B
  5. B

    Punctuation Aggravation

    It took forever to get the following line to work in VBA: Set rst = dbs.OpenRecordset("Select [LocationName] from PWS where [LocationNumber] = '" & Me.LocationNumber & "';") Now I am trying to get the following line of code to run with no success: Set rst = dbs.OpenRecordset("Select...
  6. B

    Concatenation of field name

    I am trying to get a message box to show the contents in several fields in a Do loop by concatenating the letter "F" + a counter. The following are values in fields in the form I am working with Field Name Value in Field F8 A F9 B F10 C What is the...
  7. B

    Cursor placement

    Hello All, If the user enters an invalid client name in the client field of a form, I have a msgbox pop up that says invalid client name. No problem. I want to make the cursor go back to the client filed in the form to correct the entry. What is the vba code that will allow me to place the...
  8. B

    Data type mismatch

    The following line of code works: Set rst = dbs.OpenRecordset("select [PWSNAME] from Client where [ClientNum] = '9190';") The following line of code gives the error described after the code below: Set rst = dbs.OpenRecordset("select [PWSNAME] from Client where [ClientNum] = " & Me.ClientNum &...
  9. B

    Executing select statement in vba

    We have created a form from our custody table called frmCustody. The form has a text box called - txtClntNum and a field called client. I have the following statement: Option Compare Database Dim strLabID As Long, strClient As String Private Sub txtClntNum_AfterUpdate() strClient =...
  10. B

    Assigning variables

    We have two tables - Custody Log and Client We have a form with two fields that has been created from the Custody Log Table. The first field is a textbox where you type in a client number (txtClntNum), the other is the Client Field. We want txtClntNum_AfterUpdate() sub to get the...
  11. B

    Setting Values in a Form

    We have a table called Custody Log that has Lab ID #s for every sample rec'd by our lab. I want to set up a form for adding new samples to the table. The Lab ID for a new sample is 1 greater than the last entered sample. Last record in the table is 708005 How can I make the LabID field in the...
  12. B

    recording a macro in Acess 2007

    Hello, I learned a lot of the vba coding techniques I use in excel by using the macro recorder. A great way to learn to do things. I am now just starting out in Access, and would like to use a macro recorder to record actions I take. For example I would like to find the commands for...
Back
Top Bottom