Search results

  1. G

    Mistery Parameter for Function

    Hello All, I have two bound text boxes that are using the same function to convert their decimal source data into fractions. The function works well on one of the boxes but generates an error on the second box and that is because the number "20520" is being passed as the parameter (the function...
  2. G

    Input Mask Error

    Hi All, This might be easy but I can't seem to get it working. I want to force users to use decimal point in a field where units of measure are entered eg. 12.5647, 9.5478, etc My input mask for that field is 00\.0000;1;_ but it does not save the decimal point. 12.5647 will be written as 125647...
  3. G

    Refine Query

    Hi All, This might have been answer on another occasion but I can't seem to find anything that looks similar. The following SQL SELECT EDGW_HOLD.RunDate, CCOEORDE_RIZZO.PROJNO, CCOEORDE_RIZZO.ONUM, CCOEORDE_RIZZO.FPNUM, EDGW_HOLD.Ticket, EDGW_HOLD.Defect, EDGW_HOLD.Footage FROM...
  4. G

    Pop-up form not updating the record

    Hi all, A db shows its records in a subform from where I click a field to edit the contents of that field in a pop-up form (see pic). All works well except when the field contains no data. The pop-up opens blank (because there is nothing in that field) but will not update the field with typed...
  5. G

    Join Properties in a Select Query

    I have table1 with fields 'project', field1, field2, field3 and table2 with fields 'project', fieldA, fieldB, fieldC. I need a query that has all fields from table1 and only fieldA from table2. What kind of join property should it have in order for me NOT to have duplicates? 'project' field in...
  6. G

    DMAX and Linked tables

    Anyone has encountered a problem with Dmax and linked tables? Or is it my code? The following line generates a run-time error '62506' only when my table is linked but not when the table resides in the db. Any ideas as to why? NextNum = DMax("Val(Ticket)", "tblHolds") The 'Ticket' field is a...
  7. G

    Help Creating an Apend SQL Statement

    Hello all, I am moving records from one temp table to my main table using a SQL INSERT INTO statement. I got that part right. What I need help on is creating the criteria aspect of it. The query should look into the values of the main table and not import the record if it will be duplicated...
  8. G

    Help with SQL

    I need help with creating a SQL statement that also displays null values. I have a form with list boxes. The code below creates the SQL statement by reading the values from the lists: For Each varItem In Me.lstMachine.ItemsSelected strMachine = strMachine & ",'" &...
  9. G

    Help with SQL code

    Hello All, The following SQL statement is promting the user to enter machine number. Why? If I remove that part of the statement then it works fine. SELECT tblData.* FROM tblData WHERE tlbData.[Machine] IN('WH3') AND tblData.[Project] Like '*' AND tblData.[Repeat] Like '*' AND...
  10. G

    Select Case with Time

    Hello All, I am trying to build a Select Case rutine where something happens if the time field is betweeb a given time slot. This does not seem to work: Dim varTime As String varTime = Format(Now, "h:mm:ss AMPM") Select Case varTime Case Is > #11:59:00 PM# And varTime < #8:00:00 AM# MsgBox...
  11. G

    SQL as row source for a combo box

    Hi all, This is probably simple but here it goes: I have a simple SQL statement as the row source for a combo box. The statement pulls the year from a date field. Every record has a date ranging from 1999 to date. The problem I'm having is that the year repeats as many times in the combo box as...
  12. G

    Getting the value for the next field

    Hello all, I was wondering how to do this: A table has users and levels for the users. I have the following line of code: Criteria = "[User] = '" & Environ("UserName") & "'" This line searches for the username in the table just fine. The following field in the record is "level" which can be...
  13. G

    Code Acting Up

    Hello All, Can anyone tell me why the following code is closing the database? This code sits behind the After Update event of a combo box: Private Sub cmbDefect_AfterUpdate() On Error GoTo RptErr 'Search for claims in the Film_Claims DB If Me.cmbDefect = "Curl Issues" Or Me.cmbDefect =...
  14. G

    Displaying subrecords

    Hello all, What is the best way to display subrecords or related data when using a subform in datasheet view? I have a main form which has the subform in datasheet view. This subform displays my records. I would like to display other related data somehow somewhere but I'm not sure of a way to do...
  15. G

    How to build a number?

    Hello all, I need help building a number. My table has a field which can hold any of three values: 1. a four digit number incremented by one or 2. a combination of a four digit number plus a letter at the end or 3. the word 'INFO' I want to be able to generate the next available number. I have...
  16. G

    Check my code please

    I have this piece of code: ----------------------------------- Dim Row, C As Integer Dim Column As String Row = 22 Column = Chr(67) C = 0 While Counter <> 9 For Each Control In Me.childfrmMstrRollInfo.Controls .Range(Column & Row).Select .ActiveCell = Control.Value C = C + 1...
  17. G

    Query criteria from either of two forms

    Hi all, I am creating a query where the criteria for one of the fields can come from either one of two forms depending on the form that is open. Both forms have a similar text box with a reference number so I want the query to grab that number from eiter form1 or form2. The problem I'm having is...
  18. G

    Report only consecutive numbers

    I have read a couple of posts that are close to what I need but not exactly. I have a table that contains press number and roll number. There are 7 presses. Each press might have rolls numbered 1 to 100, but not always, sometimes some numbers are skipped. Ex. Press 1 rolls 1, 2, 4, 8, 9, 10...
  19. G

    Source for a report

    Is it possible to programmatically change the source of a report at run-time? I have a procedure that allows the user to create a query at run-time based on the fields selected from a list box. The query changes depending on what the user has selected. I want that query to be the source for the...
  20. G

    Revise the code please

    Can anyone tell me why this code is not detecting the changes made in the bound subform? If Me.ChildEditData.Form.Dirty Then DoCmd.RunCommand acCmdUndo Else MsgBox "There were no modifications made to the current record.", vbInformation, "Invalid Undo" End If Thanks, George
Back
Top Bottom