Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Continuous Form -- Hide unbound field unless current record

Posted on 2006-06-29
9
Medium Priority
?
431 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 2000 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 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