Search results

  1. Howlsta

    Creating a new record in a subform

    Okay, I'll try it later today. thanks Rich
  2. Howlsta

    Creating a new record in a subform

    Thanks for your reply Yes, the tables are set up like that except that orders just has OrderID FurnitureCategory so the orders table just contains all the types of furniture etc in stock. There are no other fields at the moment. The other tables are exactly like you say. The query on which...
  3. Howlsta

    Creating a new record in a subform

    Hi there, I am creating an orders database type thing and am struggling with updating info in a subform. I have three tables in my database one for customers, one for orders (which has fields OrderID and furniture category) and one for customer orders. In my form I am displaying the customer...
  4. Howlsta

    Code for moving to next record (right navigation button)

    Okay, found it! DoCmd.GoToRecord , , acNext
  5. Howlsta

    Code for moving to next record (right navigation button)

    What line of code is required to move to the next record? i.e. the code that would apply to the move one record to the right navigation button. I need to turn of the navigation button so that the user is forced to press a cmd which also runs an append query. I'm in data entry only form. I've...
  6. Howlsta

    A quicker way yo delete thousands of records?

    How would the left join work do you reckon this would do it DELETE [Casualty details].*, [Vehicle details].*, [Attendant circumstances].Date FROM ([Attendant circumstances] LEFT JOIN [Casualty details] ON [Attendant circumstances].[Accident Key] = [Casualty details].[Accident Key]) LEFT JOIN...
  7. Howlsta

    A quicker way yo delete thousands of records?

    Sadly, the cascade delete is not applicable to one of the tables as the linked field is number in one and text in PointID, this might seem odd and it does to me, that's how the tables were created. That particular table is used with MapX as it contains grid references apparently it has to be...
  8. Howlsta

    A quicker way yo delete thousands of records?

    Hi Access Afficionado's, I'm trying to knock out some records like so in VB: sSQL = "DELETE * FROM [Attendant circumstances] WHERE (Year([Date]))LIKE " & MyYear g_DataConnection.Execute sSQL sSQL = "DELETE FROM [Casualty Details] WHERE [Casualty Details]![Crash Reference] NOT IN...
  9. Howlsta

    Type mismatch probs when deleting multiple records

    It was quite simple in the end, just a case of getting some syntax correct: sSQL = "DELETE FROM [PNT_Accs] WHERE [PNT_Accs]![PointID] NOT IN (SELECT clng([Accident Key]) FROM [Attendant circumstances])" g_DataConnection.Execute sSQL
  10. Howlsta

    Type mismatch probs when deleting multiple records

    Hi Readers, I really hope someone can help with this. I want to look through 2 tables and if the PointID in one table does not appear in another table in a field called Accident Key then I want to delete the record. The code I have used is below, similar code works on other tables, but PointID...
  11. Howlsta

    Search

    [code] is equivalent to whatever the field is called in your query, substitute txtCode for whatever your textbox is called or alternatively rename your textbox to txtCode. So, no you don't have to declare these. Rich
  12. Howlsta

    Sum to get totals problem.

    I took out all the totals fields in the form footer, copied and pasted the form gave it a different name and tried adding the fields again one by one with the expressions it's now doing the calculations! I suppose you have to expect stuff like this with a Microsoft product! Rich EDIT - I've...
  13. Howlsta

    Sum to get totals problem.

    I would try that, but unfortunately it doesn't apply in this particular case as i'm in continuous forms. I'm getting columns of data and each field in the column has the same control source. Alternatively how can I do this with code? thanks Richy
  14. Howlsta

    Combo Box

    You could try something like this in the beforeupdate event of the combo. dim head head = DCount("[relationship]", "tblIndividuals", _ "[relationship] = 'head' AND [familyID] = " & Me.[familyID]) if head <>0 then your msg here cancel=true end if i'm presuming each member of the same family...
  15. Howlsta

    Sum to get totals problem.

    Folks, I've got my continuous form which has a sub query as its record source. The sub query is based on a xtab query. The columns in the form represent age ranges and each range has a count and percentage for the type of child restraint used. All I want to do is have a total for each column...
  16. Howlsta

    Xtab query to show percentage, aaaaarrrrrgggggghhh

    seems I have to put nz in front of every reference to a field name: 19-24: (nz([19-24mths])/(nz([0-9 mths])+nz([10-11 yrs])+nz([10-18 mths])+nz([11-12 yrs])+nz([19-24mths])+nz([2-3 yrs])+nz([3-4 yrs])+nz([4-5 yrs])+nz([5-6 yrs])+nz([6-7 yrs])+nz([8-9 yrs])+nz([7-8 yrs])+nz([9-10...
  17. Howlsta

    Xtab query to show percentage, aaaaarrrrrgggggghhh

    Hi folks, here is my SQL TRANSFORM Count(childinfo.agechild) AS [The Value] SELECT childinfo.chilRestraint FROM childinfo GROUP BY childinfo.chilRestraint PIVOT childinfo.agechild; at the moment this SQL gets the count, I want to do another a query which instead of the count will show...
  18. Howlsta

    specific number of records in a Continuous subform

    Got it now had to insert .form Forms![PBChildren]![PBchildinfo Subform].Form.AllowAdditions = False
  19. Howlsta

    specific number of records in a Continuous subform

    I'm trying to do a similar thing, but I need to put code in the AfterUpdate event of a text box that indicates how many records will go into the subform. What is the correct syntax to set allowadditions in a subform, as the code is in the main forms module. At the moment i'm trying this without...
  20. Howlsta

    message boxes

    . one significant difference is that the Open event can be canceled, but the Load event can't. For example, if you're dynamically building a record source for a form in an event procedure for the form's Open event, you can cancel opening the form if there are no records to display
Top Bottom