User Profile

Collapse

Profile Sidebar

Collapse
PhilOfWalton
PhilOfWalton
Last Activity: Mar 17 '19, 09:03 PM
Joined: Mar 15 '16
Location: Essex, England
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sorry, got the same error in both the updates. It should read
    Code:
    If Nz(cboSpecificGravity) = 0 Or IsNull(cboTemperature) Then
    instead of
    t
    Code:
    If IsNull(cboSpecificGravity) Or IsNull(cboTemperature) Then
    It is essential that you have Option Compare Database and Option Explicit at the top of every module.

    For example, Option Compare Database will treat the letter "A" and the letter "a"...
    See more | Go to post

    Leave a comment:


  • Are you using the form "FrmCorrections "? The database I sent you works perfectly. Does it for you?

    If you have changed any Control Names, change them back to the names I gave you, because the StrSQL won't find those names.

    If you still have problems, please send the your Db back to me.

    Phil
    See more | Go to post

    Leave a comment:


  • I'll try to explain the code, but if you want further help on the tables & forms, I think you should start another thread, as this one if getting too long. See
    https://bytes.com/newreply.php?do=postreply&t=972149 and any other articles you can find about Database Nomalisation.

    To try to explain the code, the 2 update statements check here is a valid S.G. & Temperature.

    Code:
    Option Compare Database
    ...
    See more | Go to post

    Leave a comment:


  • Grovelling apologies, I sent the wrong database

    Try this instead.

    Phil...
    See more | Go to post

    Leave a comment:


  • I have modified your Db and added tables TblCorrections (exactly as your initial table including the error in SG80, temperature 240) and TblCorrections.

    Also added Form FrmCorrections. This is purely to get the corrections working correctly. which I think I have achieved.

    If you are happy with this, I think you should have a look at your tables & relationships, which leave lots to be desired. In particular, it is...
    See more | Go to post

    Leave a comment:


  • I see what you mean about the conversion factor going "off" at the higher end of the temperature scale. It is worst at an S.G of 80, and becomes very small at an S.G if 105. I originally only had temperatures from 220 to 250F°.

    I have jiggled the factor, and in the worst case scenario, get an error of 0.0007 in the last decimal place.I have been having another look at trying to calculate the factors from the S.G & temperature....
    See more | Go to post

    Leave a comment:


  • Good start, so let's see what we can do to make life easier.

    I know nothing about buses, so please correct me when I am wrong.

    Firstly, it always helps with a database to use drop down Combo Boxes to enter data, because if they are entered by hand, Typos frequently occur and Bluebird is not the same as Blue bird. So it may pay to have a TblManufacturer s and a TblModels, and on your form both would be entered using Combo...
    See more | Go to post

    Leave a comment:


  • Perhaps, if you could send an image of your relationship pane (with all the fields in the tables showing), and images of your forms, it would give us a better chance of helping you

    Phil
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to current user name display on form
    Hi Carl

    Try this
    Code:
    Option Compare Database
    Option Explicit
    
        Private Declare Function apiGetComputerName Lib "kernel32" Alias _
        "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
        
        Private Declare PtrSafe Function apiGetUserName Lib "advapi32.dll" Alias _
        "GetUserNameA" (ByVal lpBuffer As String, nSize As
    ...
    See more | Go to post

    Leave a comment:


  • Welcome to Bytes. When I saw your user name od CheapWINE and the word VIN in your question, I thought this would be a nice thread obout alcohol. Ah well...

    We don't normally write databases for people, as we expect them to put some effort in, even if it is wrong, then come back to the forum and say "This is what I've done. This bit isn't working, can you help?"

    What you want is reasonably simple, so let us...
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to Combo related query
    I'm sorry, I can give you no further help. Again, if you look at table normalisation, you will see that if the same piece if Alpha data (ProjectName), the database is not normalised, and you will run into trouble. The way you have set out your table the ProjectName will appear once for each beneficiary, so what happens when the Project name is unintentionally mistyped. "ProjectABC " is not the same as "Project ABC", so your Combo...
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to Combo related query
    As I said, you need either 2 or 3 tables.

    I gather you are saying that one project can have several beneficiaries. In which case you need the 2 tables I have already mentioned
    Does the reverse also apply that one Beneficiary can be involved with more than 1 project? In which case you need 3 tables.

    Either way you will need TblProjects and TblBeneficiarie s. The latter table will hold things like name, address,...
    See more | Go to post

    Leave a comment:


  • Please answer the questions. The link does not help in the slightest.

    Phil
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to Combo related query
    Nslotto. Before going any further, please read any articles you can find on Database normalisation. In particular, you will find that a table should contain information about one subject and that subject should exist in it's own right.

    So you should have a table of projects (and obviously they have no direct connection to the Supplier, and a table of Suppliers which is basically a "free standing" list of people.
    ...
    See more | Go to post

    Leave a comment:


  • Sorry, makes no sense to me at all. Please rephrase this

    Where are you getting the Criteria from?

    Can you please give an example of your table and the calculations you use to give you the margin?

    Phil...
    See more | Go to post

    Leave a comment:


  • A little bit more information on the tables you are using and the criteria would be helpful (preferably send an image of your relationship page, with all the fields showing).

    Often if you have problems with Null values, use the Nz() function which converts Nulls to Zeros.

    If you can avoid the use or temporary tables, that will save database bloat.

    Phil
    See more | Go to post

    Leave a comment:


  • It's only a guess, but if EmployeeID is a long number (or AutoNumber which is also a long number), line 21 should read
    Code:
    WhereCondition:="EmployeeID = " & !EmployeeID, _
    The single quotes would only be used if EmployeeID were text.

    Phil
    See more | Go to post

    Leave a comment:


  • Two points.

    1) It is bad practice to store a calculated field in a table. (see articles about database normalisation).
    If you can do the calculation, it is simple to create a query based on your table, and just add the calculated field to the query.

    2) Do you intend to update the linked table to match the updated local table?

    Phil
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to Progress Bar with an action query.
    Whoops! the link has vanished to the zip file.

    Have re-linked it

    Phil...
    See more | Go to post

    Leave a comment:


  • PhilOfWalton
    replied to Progress Bar with an action query.
    Welcome to Bytes, Mickey.

    As far as I know it is not possible to do, however, if instead of using a query, you do the same thing using VBA, we can interface the VBA with a progress bar.

    See the demo at
    https://bytes.com/topic/access/insig...r-progress-bar

    Phil...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...