Solved

Continuous Form -- Hide unbound field unless current record

Posted on 2006-06-29
9
427 Views
Last Modified: 2008-03-17
Hello Experts,

this question may have been asked but I didn't find an answer that would have allowed me to fix my form problem.

Here's what I have:

- Form which is bound to a query.  The form's view = "Continuous".  
- The form has currently only 2 fields: [Comment], [ID];  while ID is hidden
- I also have a 3rd control; an unbound textbox

The main purpose of this form is to update records given certain criteria (it's not really important what this update entails).   However, what is important are the next few steps.

1. The update is done one record at a time (the currently selected record).   This is due to "manual review".
2. If the analyst decides to update the record, he/she clicks a command button (Auto-Correct).   Once clicked, the AutoCorrect function (again, not really important to discuss its functionality) kicks in and places the "new comment" (with its modifications) temporarily into the unbound textbox.
3. If the analyst agrees w/ the "new value" of the updated comment (which again, is temporarily held in the unbound textbox), he/she clicks on a 2nd command button and the value of the unbound textbox is then permanently stored in the comment field.

Okay, that's enough background... here's now my actual problem:

Due to using the continous form view, I see e.g. 3 records in the form.   Once step #2 (clicking the AutoCorrect function) is executed, I now see the "new value" of e.g. record #1 in as many unbound textboxes as I have records.   I didn't expect this, but it makes sense to me (now).

I tried the following:
- set unbound textbox's visible property to "no"
- in Event, set unbound textbox's visible property to "yes" on current record... that doesn't work though

Does anyone know of a "smart process" that allows me to stick w/ the current process (e.g. using the continue form view), but somehow "hide" the unbound textbox, except for the current record?

Thanks,
EEH

P.S. I hope this makes sense... if not, I'll be more than happy to post a sample db
0
Comment
Question by:ExpExchHelp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 17009987
because its a continuos form, unbounded controls will get repeated for each row and u will find the problem u are getting
unbound does not work well with continuous

U could try create the textbox in the header section

And then on Form_current, u can update the textbox to hold the value of the current comment

private sub Form_Current()
    Me.unboundCommentBox = Me.Comments
end sub


The user can then make changes to the textbox, then on the click of a button, also in the header

private sub cmdApply_Click
    Me.Comments = Me.unboundCommentBox
end sub



well something along those lines anyway

note, it dont have to be in the header, it can be in the footer also
0
 

Author Comment

by:ExpExchHelp
ID: 17009998
KIS... keep it simple... header/footer works for me.

Thanks,
EEH
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17010012
Alternative perhaps is to present a listbox which shows your comments


As the user clicks on a listbox, u populate unbounded controls

then user can make changes to this unbounded control and click save
drawback is u have to create the sql to update it
e.g

sSql = "UPDATE table SET Comments = '" & Me.unboundCommentBox & "' WHERE ID = " & Me.ID
DoCmd.RunSQL sSQL

hmm, that looks familiar :)

0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 65

Expert Comment

by:rockiroads
ID: 17010020
Damn, that was quick, accepted before I gave the alternative!

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17010052
Im doing well today and u've helped with 2 of them
Last 10 answers have had my solution accepted

Worrying thing is, where have all the other experts gone to?
0
 

Author Comment

by:ExpExchHelp
ID: 17010056
Hmh, the comments can be very long (e.g. > 255 characters)... not sure if the listbox would be most suitable for their display... good idea though.

Again, thanx,

EEH

P.S.  While alternatives are always good..., the 1st instinct is sometimes the best 8)
0
 

Author Comment

by:ExpExchHelp
ID: 17010087
Congrats... good point... I posted question (in the past) where at least half-a-dozen experts kicked in ideas within minutes... maybe some getting tired of "easy" questions from new-comers like me and look for bigger challenges.  8)
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17010152
I guess its time of the day
The Experts are all volunteer's anyway so people like myself have a job. Perhaps people are busy with their jobs also.

0
 

Author Comment

by:ExpExchHelp
ID: 17010220
absolutely... I understand (about jobs)... I was just piggy-bagging on your comment since I had the same thought.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question