all I get is a message saying I cancelled the previous operation, if I have I cant find how or where I did it
Josie,
If I may cut in here: It looks like you know what you're doing. Error messages should (sometimes) not be taken literally, as most of them are just trying to tell you that you are not operating the program the way it was "programmed", or instructed to operate. So, I wouldn't worry too much about that. But, on the technical note, I would say that in order to fix the issue at hand, a little more background and
specific information on what
exactly you want would be helpful.
This is my lastest attempt on Subform Load -
Me.Name of field I want populated = DLookUp("[fieldname of data from last record, this to be used in field I want ]", "table Name”, ”[ field I want populated]= Forms![mainform]![subform].Form![Name of field I want populated] ")
This code looks OK to me, but the problem might lie in the fact that you have put the syntax with the
load event of the form. I think you mentioned that you are dealing with more than one subform, and you didn't go into detail about it, but that might also be a source of error here.
I can tell you one thing for sure though: The function that you provided should work just fine if you are loading (I think!) a separate subform, that is completely independent of the subform you are getting a value from. That sub too, has to only be nested inside the Main Form, as that is how your code is written. Another thing to know about DLookup is that, when you don't specify criteria (which you have, I know), the function will return a random value in the field you are querying.