Search results

  1. S

    Simple Question, I hope!

    Hi Guys, I have a form that has a few buttons on it, fairly basic. One of the buttons performs an action, and when the form is open, I might press it up to 20 times with different values in the form. Basically, the button appends records to a table based on values I put in text boxes. What I...
  2. S

    Selecting Records from a table

    Thnaks for the help everyone, I couldn't really get it to work, but I have solved it using some very basic code to select the records in order in the table.
  3. S

    Selecting Records from a table

    Thanks Modest, It probably gives me what I need, I just need to play with the code a little to get it to do what I want. Thanks for the help.
  4. S

    Selecting Records from a table

    Okay, I can understand why it is confusing as I am not explaining it very clearly. My Database is a LIMS (laboratory information management system) which stores all the data we generate in our lab. It is made up of quite a few tables, but the main one is tblSampleSubmission which has the...
  5. S

    Selecting Records from a table

    Thanks for the help everyone, but I am still falling in a hole. What the biggest issue I am having is, the code automatically adds records to the table from the first number entered to the last number entered with SampleName being the unique identifier. This is indexed and no duplicates allowed...
  6. S

    Selecting Records from a table

    Does anyone have any ideas on this?
  7. S

    Selecting Records from a table

    Thanks very much Wayne, I don't think that I explained myself quite right in the first place. When the random number is triggered, it does the DUP code first, which will always be unique as it just appends DUP to the previous records SampleName. Next it looks up a randomly selected record...
  8. S

    Selecting Records from a table

    Hi All, This is my code used to populate a table: Private Sub LogSam_Click() Const MyTable As String = "tblSampleSubmission" Const MyField As String = "SampleName" Dim db As DAO.Database Dim rs As DAO.Recordset Dim intCounter As Double Dim LastDub As Double Dim minID, maxID, stdID As Long...
  9. S

    Adding Records to a Table

    Hi All, I have the following code which populates a table using the start and values entered in a form. I was wondering if there was any way to define the number increment that it uses? In some cases, it only needs to enter every second number, is there any way to tell it to do this in vba...
  10. S

    Run Time Error 2439

    Thanks very much for all your help, it works great!
  11. S

    Run Time Error 2439

    Thanks Bob, I have played around with it and I have got the following code to sort of work, but it isn't looking up the fields in the table like it is supposed to, any ideas? Private Sub Report_Open(Cancel As Integer) Dim dbs As Database, rst As Recordset Dim TBLLoop As Integer, strColName...
  12. S

    Run Time Error 2439

    Hi all, I have a report which has the following code in the On Open command: Private Sub Report_Open(Cancel As Integer) Dim dbs As Database, rst As Recordset Dim TBLLoop As Integer, strColName As String Dim intRecs As Integer Set dbs = CurrentDb Set rst =...
  13. S

    Problems Accessing Backend

    Nobody has any ideas on how I can fix this?
  14. S

    Problems Accessing Backend

    Okay, This is a bit of a weird one I hope someone can help with. I have a fairly small db that needs 3 con-current users. It is split and until recently, the backend resided on one of the computers in the shared folders directory. In this configuration it worked fine, but just recently I have...
  15. S

    Select Query using a Value in one or 2 combo boxes

    Thanks for the reply Dave, I tried what you suggested, but it still asks for the first value even if the form isn't active and the combo box is empty. Would it just be easier to write a new query?
  16. S

    Select Query using a Value in one or 2 combo boxes

    Hi, I currently have a select query that has a where statement to select a value depending on the value of a combo box in a form. WHERE (((tblSampleSubmission.SubmissionNumber)=[Forms]![frmReportPreview]![SubNumber])) What I am wondering is there any way that the where statement can be for...
  17. S

    Using vba to open a Report based on a Field Value

    Hi Guys, This might be pretty simple, but what I am trying to do is to write some code attached to a form that will open one of 3 or 4 different reports (different formats) depending on a value in a query. For example, you select a particular value from a combo box and it runs a query to check...
  18. S

    Problem with query filter

    Yes, it works fine, I found some advice from www.fontstuff.com on how to do this. If the query has everything you need in the table and the relationships are correct, it works fine. The form frmMositureInput is now based on the query, not the table and using the query as a filter. There might be...
  19. S

    Problem with query filter

    Thanks for the reply, but since the post I realised I was going about it the wrong way. Instead I based the form on the query, not the table with a filter, it works fine now. Thanks for the guidance.
  20. S

    Adding a record to a Table from a field list?

    Thanks for the reply, Doc Man. What The purpose of the table is to log samples into the laboratory as they are received and print out a job sheet and labels etc for the job (submissionNumber). The 'Standard' I am referring to in this case is one of a number of certified reference materials that...
Back
Top Bottom