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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a new field in Access

Status
Not open for further replies.

tearsong

IS-IT--Management
Aug 3, 2005
8
US
I'm trying to get Access (Office 2003) to only create a new field in a form when the previous field has had information entered into it. (I realize that this will probably leave me with a blank field at the end, but this is for personal use, so i'm not really all that concerned with it.)

It's partly just for personal learning and partly a project to help me in looking for Grad schools (I'm also up for recommendations for schools with M.S. (networking/security) in or around NYC! ^_^ ) some colleges have 8 pre-reqs with 15 reqired courses and some have 5 pre-reqs and 20 courses... so I'd rather just have 1 empty box than 50... I had it in a memo before... but i tried to print a few, and it just didnt work as some of the notes in the fields are just too long...

I got as far in Access as in 'Properties' -> 'Event' -> 'After Update' (which I took to mean, after 'updating' or populating the field... am I wrong here?) which took me to a VB editor and now i'm stuck at:

Private Sub Text145_AfterUpdate()
End Sub

unfort, I don't know if it is done a better way, or if this is the best way then where to look to code this sort of thing since the languages I studied years ago were TruBasic, C++, and Java...
 
Hi tearsong

you can't create a field for some of the records , you have to create it for all of the records. You can of course leave the field blank for some of the records.

Is this what you are trying to do?


Ian Mayor (UK)
Program Error
Programmers do it one finger at a time!
 
Well, I have preReqCourse1, preReqCourse2, etc, I just don't want to list all 20 of those fields when there's 0 pre-req courses for that college... I'd rather have the form generate a new field 'on the fly' so to speak when i've added information to the current field. (If it's possible, of course, lol.)

I'll even take a button to check: "do you want to add a new field?"...

also, what sorts of things can you actually do with that AfterUpdate sub routine?

~tearsong
 
Have a look here:

and then consider a continuous subform.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top