Recent content by SimonC

  1. S

    Referential Integrity

    I assume that the relationship between the two tables is based on some kind of ID field in each case but the combo box is displaying a decription of some sort. Could it be that you're either not passing the ProductID to the combo box at all, or that you are, but the column it's in isn't set as...
  2. S

    AGAIN: User defined function in statement (Access97)

    The problem you have is that "YES" a function (user-defined or otherwise) can be used as a single criteria item (as in WHERE Field1 = Function()) what you can't do with a function is make-up parts of the query string in a compiled query as you go along. In other words, where you've got...
  3. S

    Compare and Combine record fields

    Just curious - if record one has perfectly valid data and record two is missing things, is there a particular reason why you don't just keep record 1 and junk record 2? If that was OK, a fairly straightforward delete query would do the job. Also is it possible that both record 1 and record 2...
  4. S

    I must be missing something here.

    I don't understand where the value MTX is coming from in the second SQL statement. Is it possible that the value isn't set (or maybe even defined) anywhere? I'd suggest that before you run the second SQL statement you insert a debug.print statement to output the SQL code to the debug window...
  5. S

    New comer to Access/Report

    If the "S" records are linked to the "L" records, I really think you should have them in a separate table with a key value linking each one back to its "L" record. That said, there's probably a way to do what you want without doing that. One question - is there anything in the "S" record that...
  6. S

    Using Append Delete Queries in Relational Databases

    If the relationship between the tables is one-to-one, you can append into multiple tables simultaneously by appending into a query (which joins all the tables together). Where you have a one-to-many relationship, you really have to append the data separately. Simon
  7. S

    Calculating Time (I'm desparate)

    I think your best bet would be to do as much of your calculations as you can in minutes rather than trying to use datetime fields to hold time periods which, when summed, will exceed 24 hours. From your start and end time, calculate the number of minutes using...
  8. S

    Rounding on a report

    Try something along these lines: Format(CInt(Left([txtnocorr] * 100 /[txtnoofinsp],3)),"##0") & "%" Simon.
  9. S

    No Records Found

    Try something like this in the Form_Open event of the form you are trying to open: Dim rec As Recordset Set rec = Me.RecordsetClone If rec.BOF And rec.EOF Then MsgBox "No Records Found" Cancel = True End If Simon [This message has been edited by SimonC (edited...
  10. S

    Using Combo Box Column( ) Property in SQL Code

    Try this: [Forms]![frmLocation]![cboLocation].[Column]![2] Simon.
  11. S

    Update Queries and Carriage Returns

    I think the problem is that just a carriage return character (i.e. Chr$(13)) is being inserted between each "line". To get proper separation so the output appears on multiple lines, both a carriage return and a line feed (Chr$(10)) need to be inserted. Simon.
  12. S

    VALIDATION PROBLEM

    Your best bet might be the KeyPress event of the LastName text box. You get passed a value KeyAscii which contains the Ascii code of the key pressed. You'll want to allow through the upper- and lower-case alphabetic characters (65 to 90 and 97 to 122) plus a hyphen (45) and maybe a space (32)...
  13. S

    Repeating values in combo boxes

    For each of the combo boxes, change the row source to be a query which includes a WHERE clause along the lines of WHERE Category <> Forms!MyForm!ComboBox The query behind the first combo would reference the value in the second combo and vice versa. In the AfterUpdate event of the first combo...
  14. S

    Autonumber field in Make Table query

    If a field from one of the source tables is an AutoNumber, the corresponding field in the resulting table will become an AutoNumber field too. The autonumbering won't work while the make-table is run (you will get whatever values are in the source table) but it will work OK after that. Simon.
  15. S

    Searching a Subform

    If you have the sample Solutions.mdb installed there's an example in there. Select "Sample Forms" from the top box and "Sales Totals" from the lower one. Simon
Top Bottom