Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replication IDs and Visual Basic Procedures

Status
Not open for further replies.

forweefolks

Technical User
May 3, 2001
6
FI
I recently replicated a database for the first time. This included of course changing the datatypes of my indices to replicationids. The next thing I see happening is that one of my procedures stops working. In the procedure I first take a form's recordsource, modify it a little and then use to it to count certain aggregate value subsequently displayed on a form. (resorting to this kind of arguably clumsy alternative was forced upon me due to the fact formulas on the form stop working from time to time).

Anyway, why in the heck can't I recover a value from either the query underlying the form or the textbox on the form itself that would contain a replicationid-type transactionid, that i so desperately need. Any suggestions? Help! Anyone?!?

recsourcestring = repsub.Form.RecordSource
recsourcestring = Left(recsourcestring, Len(recsourcestring) - 2)
'recsourcestring = recsourcestring + " where [repayments]![transactionid]=" & (Forms![ExpCreditrepaymentschedule]![TransactionID])
Set recsetrepayments = db.OpenRecordset(recsourcestring, dbOpenDynaset)
If recsetrepayments.RecordCount > 0 Then
recsetrepayments.MoveLast
reccount = recsetrepayments.RecordCount
Else: reccount = 0
End If
If reccount > 0 Then
recsetrepayments.MoveFirst
y = 0
Do Until recsetrepayments.EOF
y = y + recsetrepayments!RepaymentAmount
recsetrepayments.MoveNext
Loop
End If
If 1 = 1 Then
End If
y = Nz(y)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top