Search results

  1. R

    Creating your own Record ID number

    HI! Here's what I've got. It is called by another procedure that sends the last record number to it. Public Function fncNextRecordID(strRecordNr As String) As String 'This function returns the next string record number ' strRecordNr is sent by the calling procedure Dim...
  2. R

    SQL Syntax, incorporating a variable

    The reason your code did not work and scalextrix code did work is because the data you generated in Me.product_choice is string data and string data must be encapsulated in quotes when used in a query on the fly. Numeric data does not require the quotes or any other special character...
  3. R

    Append to multiple tables

    Hi Mike6271! Scalextric59 is Spot On! In my order system I use the following code in a click event to generate a repeat order once I have established an order number in a list control. Private Sub cmdDuplicateOrder_Click() Dim dbs As DAO.Database Dim rstOrderID As DAO.Recordset Dim...
  4. R

    Access VBA - date format conversion

    Cdate() converts a string to a date Dim dte As Date Dim str As String str = "31-12-2008" MsgBox str 'Display 31-12-2008 str = Format(str, "mm/dd/yyyy") MsgBox str 'Display 12/31/08 as string dte = CDate(str) dte = dte - 20 MsgBox dte 'Displays...
  5. R

    Inserting Picture / Image

    Hi Bob Larson! Yes I mean here in the Forum Threads. Thank you for your response. As per your instructions I was able to add an attachment. Thank you! More precisely, what I am trying to accomplish is imbedding a picture file within the text of my posting in this forum. Let's say I am...
  6. R

    Inserting Picture / Image

    I would like to thank Rabbie for his help in adding code boxes in my Threads. Now I am now needing help in pasting a picture/image in my threads. Thanks in advance and Have a very MERRY CHRISTMAS.;) Richard
  7. R

    populating a form based on query conditions

    Hi trixxnixon! I too want to make sure I understand what you are trying to accomplish. If I understand you correctly, you have existing records that have a field that is set to true/false (Yes/No). These records are related to a second set of records using a key field. When the...
  8. R

    Form based on query

    KIRK, The above technique also works for reports. I have a report that uses 5 different queries as it's record source and it is programmed using the same technique. Have fun, Richard
  9. R

    If variable is a minus number or goes into a minus number

    Have Your Tried Abs Function Example This example uses the Abs function to compute the absolute value of a number. Dim MyNumberMyNumber = Abs(50.3) ' Returns 50.3.MyNumber = Abs(-50.3) ' Returns 50.3.This will change any number to a positive number Regards - Richard
  10. R

    Form based on query

    SOS is also spot on! Your fields must have the same name in both queries. If the field names are different in query 2 there is a way to change the name of the fields in the second query to match the names in the first query during the design of the second query. You can use “Aliases” for the...
  11. R

    Form based on query

    If I understand your correctly, you want to change the Forms Record Source to a new different query. It this is correct you can change it at run time by changing the Record Source to Another Query. Me.RecordSource = qryDifferent Richard
  12. R

    Error: Object Required

    Is "AddNewRec" a function or sub routine? Richard
  13. R

    multi user form

    Hi Eddie! Another consideration. The program I designed to use at work is an orders program. The main form I designed contains the customers information and the sub form contains the product information. If your design contains only a main form, then the programming techniques that I have...
  14. R

    multi user form

    Hi Eddie! More code... When entering a new record the user may inadvertently want to close the form, or close the database, without saving (committing) or canceling the new record. Should this be allowed to happen, then the new record in the DataTableTemp table will be “stuck” in the table...
  15. R

    multi user form

    Eddie Add a cmdCancel to your form. When clicking the cmdNew button you can add the following code. Me.cmdCancel.Visible = True This button is designed to cancel a new record. If the user decides to cancel adding a new record, by clicking this button the new record in the...
  16. R

    If...Then Evaluates 7 as Greater Than 10!

    Try using: If Val(Me.cboFPFrom) > Val(Me.cboFPTo) Then MsgBox "Period From value must be less than the Period To value." blnValidation = True Me.cboFPFrom.SetFocus GoTo EndValidation End If
  17. R

    If...Then Evaluates 7 as Greater Than 10!

    You might try using val() with the cbo controls.
  18. R

    Code Boxes

    I’m not totally familiar with all the gadgets this site has to offer. In particularly I am interested in adding, what it seems everyone knows but me, the boxes with vertical and horizontal scroll bars that can be inserted into threads to fully illustrate code examples. “What I don’t know can...
  19. R

    multi user form

    Ok! I promised you some code. I am assuming that you have several computers that users utilize to create data - a multi-user environment. With this in mind, I suggest you use one computer to store the persistent data the users collect. This computer will have a master records database that...
  20. R

    multi user form

    Hi, Thanks for your previous message. Do you have some code that could well illustrate your point. It would be grately appreciated. Many Thanks ---------------------------------- I will include code at a later date. But first I must make one point clear which I did not make clear last...
Back
Top Bottom