TurboBeagle
New member
- Local time
- Today, 17:02
- Joined
- Apr 10, 2003
- Messages
- 6
The first part of the module I am trying to create is where I am creating a new table based on an existing table. At this point, I am just trying to assign each record in the newly created table the same value as the records in the original table.
The error I keep getting is:
1-You tried to write to a read-only property. See the Help topic for the property to determine whether it is read/write.
2-You tried to use a method or property on a type of Recordset object that the method or property doesn't apply to. See the Recordset object Summary topic to determine which methods and properties apply to a given type of Recordset object.
3-You tried to append a property to a Properties collection of an object that doesn't support user-defined properties.
4-You tried to use the Update method on a read-only Recordset object.
Here's the code:
Public Function Disbursements()
Dim DB As Database
Dim FilterQuery As Recordset
Dim Disb As TableDef
Dim LO As Field
Dim Difference As Field
Set DB = CurrentDb
Set Disb = DB.CreateTableDef("DISB", acEdit)
Set Difference = Disb.CreateField("Difference", dbLong, 10)
Set LO = Disb.CreateField("LO", dbLong, 5)
Disb.Fields.Append Difference
Disb.Fields.Append LO
Disb.Fields.Refresh
Debug.Print Disb.Updatable
'the debug table says TRUE
Set FilterQuery = DB.OpenRecordset("Total Profile Summary Combined Calc Filter LO")
FilterQuery.MoveFirst
Do While Not FilterQuery.EOF
Disb!LO = FilterQuery!LO <==THIS IS WHERE IS STOPS, IT DOESN'T EVEN LOOP ONE TIME<======
FilterQuery.MoveNext
Loop
FilterQuery.Close
End Function
I AM DESPERATE!!! ANY HELP WOULD BE GREATLY APPRECIATED!!!!!!!!
The error I keep getting is:
1-You tried to write to a read-only property. See the Help topic for the property to determine whether it is read/write.
2-You tried to use a method or property on a type of Recordset object that the method or property doesn't apply to. See the Recordset object Summary topic to determine which methods and properties apply to a given type of Recordset object.
3-You tried to append a property to a Properties collection of an object that doesn't support user-defined properties.
4-You tried to use the Update method on a read-only Recordset object.
Here's the code:
Public Function Disbursements()
Dim DB As Database
Dim FilterQuery As Recordset
Dim Disb As TableDef
Dim LO As Field
Dim Difference As Field
Set DB = CurrentDb
Set Disb = DB.CreateTableDef("DISB", acEdit)
Set Difference = Disb.CreateField("Difference", dbLong, 10)
Set LO = Disb.CreateField("LO", dbLong, 5)
Disb.Fields.Append Difference
Disb.Fields.Append LO
Disb.Fields.Refresh
Debug.Print Disb.Updatable
'the debug table says TRUE
Set FilterQuery = DB.OpenRecordset("Total Profile Summary Combined Calc Filter LO")
FilterQuery.MoveFirst
Do While Not FilterQuery.EOF
Disb!LO = FilterQuery!LO <==THIS IS WHERE IS STOPS, IT DOESN'T EVEN LOOP ONE TIME<======
FilterQuery.MoveNext
Loop
FilterQuery.Close
End Function
I AM DESPERATE!!! ANY HELP WOULD BE GREATLY APPRECIATED!!!!!!!!