What exactly are you trying to accomplish? That code has nothing to do with opening a form; it is placing a value from one form to another. Is this really in a macro, or VBA?
i really dont know what I'm doing. I know bits and pieces from here and there.
I have a listbox with 2 columns(Date, CallNumber). I want to double click on a record and have it open another form (frmEMCOpen) to the corresponding record (CallNumber).
I modified the one you sent me and now it asks me for the CallNumber. When I plug it in manually, it opens the right record.
I'm guessing a little on which are the correct names. We also need to confirm where exactly you are; a macro or VBA code. We also need to make sure you aren't typing that directly into the properties window.
I tried it but now it gives me runtime error2501. The OpenForm action was canceled. It is the right name. Does it matter that the ListOpen is based of a query?
That was it. I had always been told that if you really didn't need to use numbers (for math)in db, to use text insted which is what I did. Technically it is a "number" but I'm not doing any math with it.
Excellent! Glad we sorted it out. I would agree on things like phone numbers, zip codes, etc. Things like employee numbers or account numbers I store as numbers. My understanding is that numeric keys will perform better than text keys. I'm not saying it's wrong, and I wouldn't change it, just throwing out another thought.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.