Search results

  1. S

    Linked Table - Absent

    I've been struggling for a while to resolve a performance problem with an application I've been developing. Tables within the database (not linked) were taking an age to open at times. I eventually traced the problem to some linked tables whose links were broken. As soon as I refreshed the links...
  2. S

    Pre-populated Form Fields

    I have the following in the "On Change" event from the original data field: Private Sub OrigAsset_Change() If Not IsNull(Me.OrigAsset.Column(1)) = True Then 'Me.DESCRIPTION = Me.OrigAsset.Column(1) End If If Not IsNull(Me.OrigAsset.Column(2)) = True Then Me.Make = Me.OrigAsset.Column(2) End...
  3. S

    Pre-populated Form Fields

    Hello Gurus, I'm not quite sure how to word this but here goes..... I have a form that collects data from a survey. The survey has been undertaken before and the equipment being surveyed may carry an ID number and I have the original survey data in a table. If the old survey ID is entered...
  4. S

    Convert String to Number on Entry in Form

    OK, one final update to say that as I start to test the solution (I bow to your knowledge and accept using another field to feed the original asset number).... I suddenly realize that if you enter the string with the prefixed letter in the numeric field, access just strips the letter anyway -...
  5. S

    Convert String to Number on Entry in Form

    In fact, this doesn't seem to work on the before update but does work in the lostfocus event.
  6. S

    Convert String to Number on Entry in Form

    Thanks Paul but I think changing to a text field is preferable to adding an unbound control. As I say, I do have a variety of forms that ultimately feed into that particular table. If what I'm trying to do isn't possible (and why should access allow me to type a letter into a numeric field)...
  7. S

    Convert String to Number on Entry in Form

    Paul, I have tried the code that JBB suggested but I have a simple code in the before update event just to check the principal: Private Sub AssetNum_BeforeUpdate(Cancel As Integer) Me.AssetNum = 99 End Sub I've also tried the code to strip the first character but this only works if the...
  8. S

    Convert String to Number on Entry in Form

    Paul, the data will start with a number. The problem I face, and I'm trying to resolve it now, is that I have several forms that have on event code that validates the data and all of them are set up to receive a number!! If I could just find an easy way to strip the preceeding letter all would...
  9. S

    Convert String to Number on Entry in Form

    I can make this work if I change the field to text but if I leave it as numeric an event catches the string and fires the message box for invalid for this field i.e. not numeric. I'll keep working on having to use a text field instead of number field and apart from using validation as "L0000000"...
  10. S

    Convert String to Number on Entry in Form

    John, try as I might, I cannot get this to work. I really would like to be able to change the field content to a number by stripping the preceeding letter which would leave all of the existing validation in place. Am I asking too much of Access?
  11. S

    Convert String to Number on Entry in Form

    John, thank you for your reply. I can see how the code works but not sure where to put it. Do I need an unbound field in the form to input the string and then use the code to transfer the number? I tried adding this code to the before update property but access still tells me it needs a number...
  12. S

    Convert String to Number on Entry in Form

    Hi All, I have a form that takes input to the first, indexed, field from a barcode reader (and keyboard at a pinch). The data coming in has always been numeric so I have several checks in place to ensure it is numberic (field specification) and also that it lays in a predefined range. All...
  13. S

    Sub-Query - Where Clause

    Made to look sooo simple! Thank you very much.
  14. S

    Sub-Query - Where Clause

    I would like to find out how to query records from 2 releted tables where the second table has a list of records that are date stamped but I only want to return the latest record with its corresponding data from the first table. In the attached DB I use 2 queries to acheive this but I need a SQL...
  15. S

    Test Value in Temp Table Datasheet Does not Exist in Another Table

    Guys, thank you so much. I knew I couldn't be too far off the mark but I just couldn't quite crack it. In the first place my temporary table had NewAssetNum as Text and it is a number in the original table - thanks Galaxiom your point about Me.FieldName.Text prompted me to check that and change...
  16. S

    Test Value in Temp Table Datasheet Does not Exist in Another Table

    Private Sub NewAssetNum_BeforeUpdate(Cancel As Integer) If DCount("ASSETNUM", "qryAllAssetNumbers", "ASSETNUM ='" & Me.NewAssetNum & "'") = 0 Then MsgBox "There is no duplicate value in the Asset Table - " & TMPASSET Else MsgBox "A Duplicate Record Exists" End If End Sub I know the...
  17. S

    Test Value in Temp Table Datasheet Does not Exist in Another Table

    Hi All, I've been referring to this forum for a few years but never before needed to post but I cannot find a workable answer to a problem I have... I have a database that collects information on building assets - asset number, description, location, age etc. We often have locations with...
Top Bottom