Search results

  1. Pyro

    Requery Error

    Here is a stripped version. Thanks for your help.
  2. Pyro

    Requery Error

    The code that you have supplied works. The suggestion re: Referential Integrity works fine also. However i still get the same error that i was getting earlier when the parent form is opened: (2455) "You entered an expression that has an invalid reference to the property Form/Report."
  3. Pyro

    Requery Error

    Subform 1 is a continuous form showing records related to the parent form, and so it is linked to the parent. This is really only used as a list of those records (no additions or edits). Subform 2 shows an exploded view of one record from Subform 1. It is used to create new records, and or make...
  4. Pyro

    Requery Error

    You are right, the test for the subform sourceobject was there when i thought that at the point of the parent form loading, and the code of the first subform firing, the second subform was not yet loaded? However removing that test as follows: Private Sub Form_Current() On Error GoTo...
  5. Pyro

    Requery Error

    Hi, I have two subforms (both showing data from the same table) synced together by having the PK of the second subform set to the primary key of the first. When i cycle through the records on the first subform, i am requerying the second so that it displays the same record. For that i am using...
  6. Pyro

    Ribbon tab group alignment (XML)

    Hello, I am wondering whether anyone knows if there is an alignment attribute for programmatically aligning groups to the right of the tab on a ribbon? All of the default ribbons seem to have their groups aligned to the left, so i am suspecting that the answer will be no, but i thought i would...
  7. Pyro

    Execute a string

    Brilliant! Believe it or not i had that almost exactly, but Access kept freaking out because i was trying: Forms!(obj.name).visible... All i had to do was remove the apostophe!! Well here is the working code. It links to a custom button on the ribbon (Access v. 2k7) and sets all open...
  8. Pyro

    Execute a string

    Hello, I have spent a couple of hours now playing around with this, and i can't seem to get it to work. 'callback for OnButtonPress Public Sub OnButtonPress(ctl As IRibbonControl) Dim obj As Object Dim StrName As String If CurrentProject.AllForms(ctl.Tag).IsLoaded Then 'Do nothing...
  9. Pyro

    "Cannot Open Any More Tables"... or can I?

    Hello! So i am ploughing away through creating an application, and i get to building a report based on a query that references 5 or 6 tables. The query itself is not too complex, but does include aggregation and may pull criteria from several optional form fields. If i base the Record Source...
  10. Pyro

    All combos become locked?!

    Weird thing... it was actually an Access 2000 creation, and when i converted it to 2003, the problem disappeared. Must have been a bug...
  11. Pyro

    All combos become locked?!

    Hi, I am running the following code from a subform: Private Sub Form_Error(DataErr As Integer, Response As Integer) Debug.Print "Error Number = ", DataErr Select Case DataErr Case 3314 MsgBox "There is no course selected for this student." & vbCrLf & _ " " &...
  12. Pyro

    Dateadd SQL in VBA

    Ok, so i am trying to set up monthly due dates for payments, these due dates always fall on the same date of the month and are on the anniversary of a student's enrolment. A student can pay for 12 months. What i want to do is set up 12 payment due dates at the point of enrolment. This way i can...
  13. Pyro

    Setting up payments, continuous form

    Hi, I am making a a db that records information about students, courses and payments. I have a situation where all courses run for 12 months, and most students make graduated payments on the first of the month, for every month of their enrolment. However there are cases where some students...
  14. Pyro

    remove duplicates - impossible?

    Hi, Consider the following scenario: 1 table Approx 20 fields. >1,000,000 records. No PK. A reference to a FK that relates to an order number. Some records are legitimate duplicates (i.e. they exist b/c they are separate records). Someone comes along and (accidentally) copies a whole bunch...
  15. Pyro

    Dlookup freaking out

    Hi, i am trying to run the following piece of code: If DLookup("lotno", "[tbl_track_expiry]", "lotno = '" & [txtlotno] & "'") Then If MsgBox("The Batch Number you are trying to enter already exists in the system." & vbCrLf & _ " " & vbCrLf & _ "Press OK to go to that record...
  16. Pyro

    compare a record to that on a continuous form

    That was the money DCrake, funnily enough i thought of that this morning when i got back to it. Sometimes you just need to take a break and clear your head to think straight...
  17. Pyro

    compare a record to that on a continuous form

    Hi, i am trying to validate if a value exists on a continuous form from a main form. I have tried: Private Sub txtin_use_AfterUpdate() If Not IsNull(Me.txtin_use) Then If Me.cboprodname.Value = Me.sfrm_media_out_use.Form![product_id].Value Then MsgBox "There is atleast one batch...
  18. Pyro

    Log in name in the record Entry Form

    If you just want to display the Username, you could use vba: DoCmd.OpenForm "F_T_I_2" Forms!F_T_I_2.Form!UserName = Me.cboEmployee.Column(1) DoCmd.Close acForm, "frmLogon", acSaveNo After the conditions of your login form have been met. For the Location, you could use a Dlookup statement...
  19. Pyro

    Requery problem

    Hiyas, I am trying to requery an unbound combo on a subform based on a record selection on another subform (default view continuous forms). The unbound combo has this code running in it: Private Sub N_Subject_afterUpdate() 'Move to the record selected in the control...
  20. Pyro

    Wondering if there is a better way to do this?

    Hey, I have 4 tables: tblproduct_record{productid, productname} tblstocktake_detail{stocktakeid, sdate, notes} tblstocktake_product_in{piid, stocktakeid, productid, numberin} tblstocktake_back_order{boid, stocktakeid, productid, numberbo} I'm trying to make a query that shows productname...
Back
Top Bottom