Form no longer loading me.recordsource
Posted on 2004-11-01
I've had this form working for weeks loading the correct record in the form using me.recordsource=sql. Today I think I did something stupid, but I have yet to make a connection on how my changes would effect the form from loading correctly. instead of loading the form with the correct record, it just loads a blank record. I have the following code on the form's On Open:
sql = "select tblProjReqSummary.* from tblProjReqSummary where fldPRIndexNo = " & gintProjectRequestID
Me.RecordSource = sql
' added the following lines for troubleshooting
if I put a break on the first line, I can see that the SQL varable is getting setup correctly. When I hit F8, the focus drops on the me.recourdsource=sql line. I hit F8 again and it blows past the debug and msgbox and goes straight to my On Current event. At this point I type in ?sql and the SQL varable is now blank. So that makes since, as the form loads doesn't load anything, as the SQL varable is blank.
I suspect I did something stupid, but I wanted to run this my you experts just in case you have ever come across this before.