Discussion Locked

Microsoft Access Combo Box usage

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an application that is utilizing a combo box. I am using the information to populate 2 fields, field A and field B. Field A is populated all the time, field B is populated only if field B is null. I have setup a macro to update these fields, but it does not all the conditional update of field B. I am looking for information on how I can conditionally update field B from the combo box.

5 replies

by oliver w.

Hi Tom,

edit your macro, in the menu select "View/Conditions" (I've only got a german version, so it might be a different name). This will insert a new column in your makro (Conditions). There you can check (For Field B) if Field B is null.

Ifyou got any questions, fell free to contact me. (e.g. mail an example)

Hope that helps,
Oliver

by donq

Your statement doesn't make much sense - "field B is populated only if Field B is null"????

In any event - forget the macro.

1. Open query design and load the appropriate fields containing Field A, Field B, + all conditional fields.

2. Using the "Criteria:" line enter EVERY constraint until the result produces exactly what you wand.

3. Switch to SQL View and Copy everything to the clipboard ([Ctrl]+C.

4. Open your Form and Paste [Ctrl]+V the SQL into Combo box linked to Field B under its "Row Source" property. (if you did everything correctly it will populate the combo box only when Field A is Null - if that's what you meant in your opening statement and emulated building your query?

This discussion is closed to new replies.