Search results

  1. B

    Help with update table code.

    Hi all, I have some code which I want to update a field in a table. But I get the error datatype mismatch and I'm not sure why I get that error. Here is my update code: Dim db As DAO.Database Dim rs As DAO.Recordset Set db = CurrentDb Set rs = db.OpenRecordset("Select * from faults...
  2. B

    Show first Record in a combo box.

    Hi all, just wondering how I go about automatically showing the first row in a combo box instead of a blank row. Thanks
  3. B

    Using And in VB

    How do I write this in VB: If tempInt >2 And tempInt < 5 Then Bla bla bla Thanks-
  4. B

    Add paint component to a form

    Hi All. Not sure if this is possible or not but is there a way to add a section of a form so that a user can add a drawing to a form and have it stored in a folder where it can be recalled later as an image? Thank You
  5. B

    Form with subform help

    Hi all, Is there any way of showing data from two tables in one form without using a subform? When I do use a subform, it has the navigation bar at the bottom of it and the user can move forward in the subform without moving forward in the main form. Please help!!
  6. B

    Help with Sql statement

    Hi all, I want to create a query but Im not sure how to go about doing it. I have a table with a list of machines and any faults that happen to them. I need to be able to bring back just the machine name with a count of the number of faults for each machine. How do I do this? Thank You
  7. B

    Help with sql

    Here's my code to try and select some data from a table. The three fields I have are all of the data type yes/no so they have a check box as their values. How do I get that value into variable using sql? Heres my code so far, but it is giving me a data type mismatch. Please Help Dim...
  8. B

    Help with If Functions

    Im sure that might be really simple but I just cant seem to get this if statement working. What I want to do is check a value in a form and then depending on that value open up the correct report. Heres my code Dim stDocName As String Dim docName As String...
  9. B

    Count Records in Table

    I have a table which stores records depending on some criteria. But what I need is on the main start page of the database is to display a label saying there are records in that certain table. How do I count the number of records in the table and display the label if records are present?
  10. B

    Date Problem

    Hello All, I have a table which holds records of work carried out on some equipment. There are two date fields which store the date the work was carried out and the date of the next planned work. Each piece of equipment has many work records. My problem is that I want to select the latest work...
  11. B

    Concatenating string

    Hi all. I have a text box in a form which in which the text is hyperlinked to a file stored on a server. The problem is that I only want the user to enter the file name. How do you write the code to place the file name in the hyperlink address and store it in the datebase? E.g: 1: User enters...
  12. B

    VB help with sql statement

    Hi All, I 'm having a problem with an sql statement. I need to select values from a table depending on the value in a textbox in a form. I keep getting a syntax error when I run the code. Here it is: Dim sqlrecords As String Dim tempRS As Integer Dim tempString As String Dim codeString As...
Back
Top Bottom