Hi,
My problem is this:
I need to create a field in an access table that is a combination of values from three other fields in the same record. I can't figure out how to do this. Can anyone help?
Thanks so much!
dorisq
This should concatenate the contents of three controls named txtCtrl1... into one string with a space between. This should also work in a report.
Another way, is to use some relevant event of the form to perform the concatenation (here without space), for instance the forms on current event, the after update event of some of the involved controls, in the event procedure (hit the button with three dot's on the right of the event property to enter VBE) enter something like this.
Hi Roy,
Thanks so much for your help. I hate to be a bother, but when I spoke to my computer guy (he's just as confused as I am He said that this is what I need to ask you:
We need a key field in a table that is made up of three values from existing fields in the table. How would I get that key field to fill automatically after I've finished with the data entry? Would I create a macro to add the three existing field together? Thank you again for being so patient with all my questions.
dorisq
No you don't need that, it's still violating normal forms - if you need a primary key consisting of three fields, you make those three fields a compound/composite primary key, not create another field to stuff the concatentation of them.
In table design view, select all three fields (mouse + ctrl key), then click the primary key button on the toolbar...
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.