Hello All!
I am having a problem, basically because of my lack of knowledge of Access (which I one day hope to rectify!
), dealing with using an if statement to fill in a field. Here is the senario:
I have two tables. One table, titled MainCategory has the name of the category, the Category ID field, MainID, and an empty field titled after (because I couldn't think up a better name). The second table that I would like to deal with is titled SubCategory. It has three fields: SubID, SubCategory, and main. Main is the foreign key that points to MainID in MainCategory. I hope this makes sense so far.
What I would like to do is, for each MainID in the MainCategory table, check to see if there are any instances of it in SubCategory in the main field. If there are, I would like to put the value "C" in the after field. If there are not, I would like the value "P" to go in it.
I am familiar with writing queries, but not so familiar with the query tool in Access. I am also familiar with pretty many programming languages, however I have very little knowledge of VB. So I am in some sort of quandry here! I am sure that it is quite possible to do this with Cold Fusion or ASP, however, I think it may be cleaner and easier to access the process using a module or query or whatever in Access.
Thanks so much!
Christine
I am having a problem, basically because of my lack of knowledge of Access (which I one day hope to rectify!
I have two tables. One table, titled MainCategory has the name of the category, the Category ID field, MainID, and an empty field titled after (because I couldn't think up a better name). The second table that I would like to deal with is titled SubCategory. It has three fields: SubID, SubCategory, and main. Main is the foreign key that points to MainID in MainCategory. I hope this makes sense so far.
What I would like to do is, for each MainID in the MainCategory table, check to see if there are any instances of it in SubCategory in the main field. If there are, I would like to put the value "C" in the after field. If there are not, I would like the value "P" to go in it.
I am familiar with writing queries, but not so familiar with the query tool in Access. I am also familiar with pretty many programming languages, however I have very little knowledge of VB. So I am in some sort of quandry here! I am sure that it is quite possible to do this with Cold Fusion or ASP, however, I think it may be cleaner and easier to access the process using a module or query or whatever in Access.
Thanks so much!
Christine