If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
dropdown list cbo to find record
Hi Corrine,
if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#12
|
|||
|
|||
dropdown list cbo to find record
AllowEdits was already True, but I had Enable = No. I turned Enable back to
Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#13
|
|||
|
|||
dropdown list cbo to find record
Hi Corrine,
"now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#14
|
|||
|
|||
dropdown list cbo to find record
Crystal,
Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#15
|
|||
|
|||
dropdown list cbo to find record
Crystal,
Yes, Locked = False. I thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? This is code where it's getting hung up: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for helping! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#16
|
|||
|
|||
dropdown list cbo to find record
Hi Corrine,
it is perfectly fine for the RowSource of a combo to list values from the same table is AllowEdits = yes for the form? Is the form based on just ONE table? If the form RecordSource is based on multiple tables, you may not be able to edit or add information. It is, therefore, best to base each form and subform on just one table. "This database is making me feel stupid!" read Access Basics -- it is just 100 pages, has lots of screen shots, and should give you more confidence Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace Warm Regards, Crystal remote programming and training * (: have an awesome day * Corrine wrote: Crystal, Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#17
|
|||
|
|||
dropdown list cbo to find record
(That was wierd. It posted my last reply twice!)
AllowEdit = yes for the form. The combo box is from my tbl "Company" and the rest of the form's information is coming from my tbl "Agreement". The idea was that picking the company name from the combo box the agreement info will appear. The tables are linked through the company ID, though, not the name, now that I think of it. Thanks for the suggestion. "strive4peace" wrote: Hi Corrine, it is perfectly fine for the RowSource of a combo to list values from the same table is AllowEdits = yes for the form? Is the form based on just ONE table? If the form RecordSource is based on multiple tables, you may not be able to edit or add information. It is, therefore, best to base each form and subform on just one table. "This database is making me feel stupid!" read Access Basics -- it is just 100 pages, has lots of screen shots, and should give you more confidence Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace Warm Regards, Crystal remote programming and training * (: have an awesome day * Corrine wrote: Crystal, Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#18
|
|||
|
|||
dropdown list cbo to find record
Wait! I lied! This form is based on a query, not my tables. The query is
based on the two forms. Because it's pulling information from the query it shouldn't matter that the information was originally found in two tables. Hmm. Is that square one I see again? "Corrine" wrote: (That was wierd. It posted my last reply twice!) AllowEdit = yes for the form. The combo box is from my tbl "Company" and the rest of the form's information is coming from my tbl "Agreement". The idea was that picking the company name from the combo box the agreement info will appear. The tables are linked through the company ID, though, not the name, now that I think of it. Thanks for the suggestion. "strive4peace" wrote: Hi Corrine, it is perfectly fine for the RowSource of a combo to list values from the same table is AllowEdits = yes for the form? Is the form based on just ONE table? If the form RecordSource is based on multiple tables, you may not be able to edit or add information. It is, therefore, best to base each form and subform on just one table. "This database is making me feel stupid!" read Access Basics -- it is just 100 pages, has lots of screen shots, and should give you more confidence Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace Warm Regards, Crystal remote programming and training * (: have an awesome day * Corrine wrote: Crystal, Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#19
|
|||
|
|||
dropdown list cbo to find record
Hi Corrine,
a query does not store information, it pulls information from tables -- so if your query uses two tables, then so does your form ... and herein lies the problem... Why are you using 2 tables in the form RecordSource? ~~~ The tables are linked through the company ID, though, not the name If you are using a combobox as the DisplayControl in the related table, you should switch it to textbox. Don't use lookup fields in table design The Evils of Lookup Fields in Tables http://www.mvps.org/access/lookupfields.htm Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Wait! I lied! This form is based on a query, not my tables. The query is based on the two forms. Because it's pulling information from the query it shouldn't matter that the information was originally found in two tables. Hmm. Is that square one I see again? "Corrine" wrote: (That was wierd. It posted my last reply twice!) AllowEdit = yes for the form. The combo box is from my tbl "Company" and the rest of the form's information is coming from my tbl "Agreement". The idea was that picking the company name from the combo box the agreement info will appear. The tables are linked through the company ID, though, not the name, now that I think of it. Thanks for the suggestion. "strive4peace" wrote: Hi Corrine, it is perfectly fine for the RowSource of a combo to list values from the same table is AllowEdits = yes for the form? Is the form based on just ONE table? If the form RecordSource is based on multiple tables, you may not be able to edit or add information. It is, therefore, best to base each form and subform on just one table. "This database is making me feel stupid!" read Access Basics -- it is just 100 pages, has lots of screen shots, and should give you more confidence Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace Warm Regards, Crystal remote programming and training * (: have an awesome day * Corrine wrote: Crystal, Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
#20
|
|||
|
|||
dropdown list cbo to find record
I know queries don't store info. I want the same info it is pulling to be
accessible via my form. That was why I chose the query as my record source. There are no lookup fields in my tables. "strive4peace" wrote: Hi Corrine, a query does not store information, it pulls information from tables -- so if your query uses two tables, then so does your form ... and herein lies the problem... Why are you using 2 tables in the form RecordSource? ~~~ The tables are linked through the company ID, though, not the name If you are using a combobox as the DisplayControl in the related table, you should switch it to textbox. Don't use lookup fields in table design The Evils of Lookup Fields in Tables http://www.mvps.org/access/lookupfields.htm Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Wait! I lied! This form is based on a query, not my tables. The query is based on the two forms. Because it's pulling information from the query it shouldn't matter that the information was originally found in two tables. Hmm. Is that square one I see again? "Corrine" wrote: (That was wierd. It posted my last reply twice!) AllowEdit = yes for the form. The combo box is from my tbl "Company" and the rest of the form's information is coming from my tbl "Agreement". The idea was that picking the company name from the combo box the agreement info will appear. The tables are linked through the company ID, though, not the name, now that I think of it. Thanks for the suggestion. "strive4peace" wrote: Hi Corrine, it is perfectly fine for the RowSource of a combo to list values from the same table is AllowEdits = yes for the form? Is the form based on just ONE table? If the form RecordSource is based on multiple tables, you may not be able to edit or add information. It is, therefore, best to base each form and subform on just one table. "This database is making me feel stupid!" read Access Basics -- it is just 100 pages, has lots of screen shots, and should give you more confidence Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace Warm Regards, Crystal remote programming and training * (: have an awesome day * Corrine wrote: Crystal, Yes, Locked=False. I just thought of something. The info for the combo box is being pulled from a different table than for the rest of the form. Could that be causing any trouble? It seems to be having trouble with this part of the code: DoCmd.RunCommand acCmdRecordsGoToNew End If Thank you for your help! This database is making me feel stupid! "strive4peace" wrote: Hi Corrine, "now I'm back to my original problem" not sure which original problem you mean ... not being able to pick something? is Locked = False for the control? "It's giving me a "syntax error" for that coding." please post the line that the compiler is stopping on Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: AllowEdits was already True, but I had Enable = No. I turned Enable back to Yes, but now I'm back to my original problem. It's giving me a "syntax error" for that coding. "strive4peace" wrote: Hi Corrine, if the combo won't drop, then my guess is that the control is not enabled or you have AllowEdits = False for the form ~~~ to go a new record when a form is opened, put this code in the [Event Procedure] for the form LOAD event: '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Form_Load() If Not Me.NewRecord Then DoCmd.RunCommand acCmdRecordsGoToNew End If End Sub '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user doesn't type anything, the new record will not be saved Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Tried it both ways. Dropdown still won't work. Also, or in the meantime, how do I get the form to open by default as blank and not populate until I choose something from the dropdown list? Thanks for your help! "strive4peace" wrote: Corrine and Tori, oh, hey, I totally forgot about this... for a form where you do not want to allow changes to the data, make the form RecordsetType -- Snapshot that way, you do not have to deal with Locked or Enabled for the controls -- just leave them set to the defaults you will be able to change anything that is not bound to the underlying RecordSource, such as a 'find combo' Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * strive4peace wrote: Hi Corrine, make sure that, for the combo: Locked -- No (False) Enabled -- Yes (True) this is opposite of what it should be for your data controls Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: Now the dropdown won't open at all. "strive4peace" wrote: Hi Corrine, "The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way." My guess is that you have the form AllowEdits property set to False If you want the user to be able to edit the search combo, instead do this: for each control, set: Locked = True and. optionally, Enabled = False and set AllowEdits = True for the form Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day * Corrine wrote: I have a form with a dropdown list from which I want to be able to select an item and have the rest of the form populate additional fields with that record's information. Preferrably the form will start out blank. Currently it is automatically populating with the first record and is only letting me use the navigation buttons (at the bottom of my form) to move from record to record. The dropdown list will open, but I cannot select anything from the list. This form needs to be only for running searches, not for editing in any way. Suggestions? I'm working in Access '07. |
Thread Tools | |
Display Modes | |
|
|