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.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Can you populate unbound fields in a continuous form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-05, 07:30
Peter.t Peter.t is offline
Registered User
 
Join Date: Nov 2004
Posts: 64
Can you populate unbound fields in a continuous form

Can you populate unbound fields in a continuous form. If yes, how do I do it

Peter
Reply With Quote
  #2 (permalink)  
Old 02-18-05, 07:41
M Owen M Owen is offline
Grand Poobah
 
Join Date: Sep 2003
Location: MI
Posts: 3,713
Quote:
Originally Posted by Peter.t
Can you populate unbound fields in a continuous form. If yes, how do I do it

Peter
Yes. But each column will contain the same value ...
__________________
Back to Access ... ADO is not the way to go for speed ...
Reply With Quote
  #3 (permalink)  
Old 02-18-05, 12:46
izyrider izyrider is offline
Cavalier King Charles
 
Join Date: Dec 2002
Location: Préverenges, Switzerland
Posts: 3,731
translation: that's Mike's way of saying "no"

izy
__________________
currently using SS 2008R2
Reply With Quote
  #4 (permalink)  
Old 02-18-05, 12:53
M Owen M Owen is offline
Grand Poobah
 
Join Date: Sep 2003
Location: MI
Posts: 3,713
Quote:
Originally Posted by izyrider
translation: that's Mike's way of saying "no"

izy
LOL!!!! Ah, Izy ... But they had asked the question in a different way the answer would have been "No" ...
__________________
Back to Access ... ADO is not the way to go for speed ...
Reply With Quote
  #5 (permalink)  
Old 02-18-05, 13:42
Darasen Darasen is offline
Registered User
 
Join Date: Sep 2004
Location: Tampa, FL
Posts: 520
So I'll pipe in: How would you prevent that? If I had a list of peoples names pulled from the DB and an unbound combo box for hair color could you make it so that i can select green for person one and red for person 2 etc.. w/o it changing evryones ?
__________________
Darasen
Reply With Quote
  #6 (permalink)  
Old 02-18-05, 13:48
izyrider izyrider is offline
Cavalier King Charles
 
Join Date: Dec 2002
Location: Préverenges, Switzerland
Posts: 3,731
i'm a bit rusty with bound forms, but it goes something like this:

have a header section that also looks at the bound fields of the continuous detail.

when a given record if OF the continuous is current, the header should update with the appropriate data. the header can contain as many unbound fields as you can fit on the screen.

in effect - you turn the continuous form into nothing more than a list-with-formatting.

izy
__________________
currently using SS 2008R2

Last edited by izyrider; 02-18-05 at 13:53. Reason: OF not IF
Reply With Quote
  #7 (permalink)  
Old 02-18-05, 14:10
M Owen M Owen is offline
Grand Poobah
 
Join Date: Sep 2003
Location: MI
Posts: 3,713
Quote:
Originally Posted by izyrider
in effect - you turn the continuous form into nothing more than a list-with-formatting.

izy
Or you're trying to do a poor man's subform ...

Darazen,

Here's the problem: an unbound control by definition WILL NOT look at (will not see) the data in a bound form ... And when you do make an assignment (generally thru the control's name) that assignment will show for each row of a continuous form (think of a sequence of individual forms stacked together where the unbound control resides in each form) you set them all the same. Izy's idea is somewhat of an "exploded view" of a record where the header displays a single record at any given time ...
__________________
Back to Access ... ADO is not the way to go for speed ...
Reply With Quote
  #8 (permalink)  
Old 02-18-05, 17:39
pkstormy pkstormy is offline
Moderator
 
Join Date: Dec 2004
Location: Madison, WI
Posts: 3,925
Different colors

In regards to changing the colors of bound/unbound controls, have you looked at Conditional Formatting? This might be a solution to Darasen's question. My answer on populating a continuous unbound form with different data would be the same as M Owen and the others (i.e. Yes but it would be the same data), but maybe there could possibly be a way somehow utilizing the OnCurrent event procedure and some tricky programming (not sure offhand how though but it may be possible).
__________________
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)
Reply With Quote
  #9 (permalink)  
Old 09-28-10, 03:24
rlferrand rlferrand is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
Great thread - thought I might chime in about using unbound controls on continuous forms.

Some background first. I have a continuous form that uses as its record source a query that is read only (cannot be updated). I want to give users the ability to update a certain field though. We'll call it textbox1.

I used an unbound text box (with a transparent background) that is placed directly over the field to be updated. We'll call this textbox2. When Textbox2 is entered, the value of textbox1 is read into textbox2. Since the two text boxes are aligned the same, have the same font, point size, and color, the user is unaware that they are editing data in an invisible text box hovering over another text box. When the user finishes editing the value in the textbox2, code associated with AfterUpdate event fires and updates the record. Finally, the form is re-queried and the updated data is displayed

Great idea, right? Wrong! As this thread discusses, values in an unbound control will repeat in the continuous form, which makes quite a mess.

However, I may have stumbled across a solution!

The key is how the controls are stacked. Place textbox2 BEHIND textbox1. (select textbox1 and format using BRING TO FRONT, or select textbox2 and format using SEND TO BACK)


-- textbox1 --
textbox1.Enabled = true
textbox1. Locked = true
sub textbox1.click => me.textbox2.setfocus

-- textbox2 --
sub textbox2.GotFocus => me.textbox2 = me.textbox1
sub textbox2.LostFocus => me.textbox2 = Null
sub textbox2.AfterUpdate => ... code to update the record, re-query form, and move focus elsewhere


When textbox1 is clicked, it updates textbox2 in the form. At this point, every textbox2 in the repeating form displays the same value. However, the only textbox2 that is visible is the textbox2 control that has focus. All the other textbox2's on the repeating form remain safely hidden behind their respective textbox1's.

Hope this helps.

Randy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On