dependant combo box resets after new record - ms-access

I have a form with several dependent combo boxes. They seem to be working correctly for the most part, ie offering the right values to chose from and writing them to a table when selected. The problem is that after I move to the next record and make a choice, it resets the displayed choice in the first record. However, it does not change the value that was written to the table in the first record. So, the data is being stored correctly and it is mainly a cosmetic issue. I've tried playing with on update and on current macros and cant seem to fix the problem.
Please help if you can!

Related

Are you able to use conditional formatting on access records as a whole? Changing the entire record color based on one parameter?

I am looking to highlight orders based on whether the order has arrived or not. Ex. arrived would highlight the entire record green whereas issue would highlight the entire record red.
The form i am using is a datasheet form. I am confused whether adding a text box would be beneficial but i cannot imagine how that would be presented.
I have tried using conditional formatting but I am unable to use multiple rules. I can go in manually and edit each field but this seems like a silly way to do this. I am only able to color the whole row in reports but i would like my info presented like a datasheet.
Only the id color is changing as I manually put rules in regarding the status of the order. I would like the entire record to change.
I found the work around. You cannot select multiple fields in datasheet view but in design view you can select multiple text boxes and apply the conditional formatting to change the whole row.

Adding Columns with Text Boxes to an Existing Access Report without messing up the format

Ok, I know this is dumb, dumb question, forgive me, I can't for the life of me figure it out.
So I used the Report Wizard to create a report with a few fields. So far, so good. I got columns and they're grouped with column labels, a little blue line under each label and I can drag the columns around to reorder them.
I'd like to add a few text fields with labels to that group of columns. I could just add them outside the column grouping that the Report Wizard gave me but then it never looks right (and I can't reorder the fields with a simple click n drag).
This seems like something I should be able to do easily but I can't find the option. I know it's possible because I've seen it done in other DBs. Anyone know what I'm missing/misunderstanding?

Dynamic continuous form height

I currently have a form that has a continuous subform in the footer to show "comments" for the original form record.
My issue is that each comment is of an undetermined size. I am trying to find a way to dynamically change the height of each section in the continuous form to match its contents.
Reading around online I found a lot of people saying this couldn't be done (a few years ago, so whether this is still the case I am not sure) so I tried instead to layout my own "continuous form" in the form header of the subform. This involved creating a text box for each comment using the CreateControl method. Unfortunately this method didn't work either, the new controls completely failed to appear on the form at runtime.
I am sure there is some way this can be done (maybe an alternative method to achieve the same effect) but I can't seem to find it.
Anyone had experienced with this problem or any ideas on how else I may achieve the desired result?
Each record in the subform will always be the same height (the Detail section height). What I've done in the past is to make it fairly small but add a button (or use the Click event of the text box) to open the Zoom box with the whole commment.

How do I find the HTML behind an InfoPath 2010 Form?

I am learning InfoPath 2010 and have a form that I am creating, but have two issues that I don't know what to do about. In the form I have created there are several columns (repeating tables). I pulled the data in from a database and have already set the conditions for what I want to be returned in the SQL, under the Data tab. So I have the correct data returning, however the issue is that the data is not in a consistent even row across the form (lines on a piece of paper) the lines begin to become offset by the second row and continue to the last. I have tried creating a table to put the data into and was hoping that this issue would go away, but that is not the case. How do I fix this cosmetic issue? OR where do I find the HTML code? When I select "Code Editor" under the Data tab, I am given VB code and there is not much code to work with.
Thank you for your help in advance.
CompGeekess
As I was continuing to find the resolution to my delima, I noticed that when a you have a column selected, Properties and Layout tabs appear at the top. In the Properties tab you can set the width and height of the column using in, and px. I noticed that not all of the columns had the same height in px, so I made each the same height, saved and previewed the form and now the rows are no longer offset. Interesting how something SO simple can make a huge different. The difference was only 2px off.
InfoPath actually creates an XML document, not HTML (if you right-click on a field in your Data Source you'll see a "Copy XPath" option). The best way to control your layout is using a Layout Table (Tools -> Design Tasks -> Layout)
I would recommend avoiding setting pixel values as well, and leaving control heights to "auto" whenever possible. If you're using a layout table and having alignment issues, right click in the table and go to Properties. You'll have Horizontal and Vertical cell alignment options (for the cell contents) in the Table and Cell tabs. You can also select multiple cells (just select the contents of them) and then assign that alignment to all in the same way.

Access continuous forms -- how to individualize controls per record?

I have an Access form displaying a tiny amount of data for a certain type of record. Basically it just prints the name on the left and on the right has a bunch of Rectangle controls whose background color I change in the form's OnLoad() function, according to results from a query performed using that record's ID as parameter.
This all worked fine, got my ID/name on the left and 31 boxes on the right, colored if that day of the month is reserved :) But needless to say that function can be completely arbitrary since it's code.
Then I decided to switch to 'continuous form' as to display as many records/items as possible. But alas, it was not to be -- all boxes were colored according to the query/function performed for the first record only. I figured that might be because it's the OnLoad() but changing it to OnCurrent() did not do much either. As it turns out, or that's what I read, the Rectangle intances are shared over the entire form and if I change the BackColor for one of them it changes for that box for each record.
I want to be able to change this according to a query performed on a per-record basis. Is there any way? Up until now I've only been able to find conditional formatting (the feature that's nor available for rectangles nor seems to cater my exact needs?) and kludgy Access 97 text-box hacks.
Thanks in advance :)
You may be coming from an HTML background, where rectangles would be a natural solution. They aren't in Access. I don't think they'll work for you (in fact, "kludgy" could describe the attempt in my humble opinion).
You can however display an image. You'll keep an image for each status ready to call up. I've made visual displays this way. A little later I may be able to post some code, but I think you'll find this plays out pretty simply even if I don't.
ADDED NOTE: I'm glad this looks like it will work for you. You are concerned about "instanced only once" in your comment below. Yes, that's true for rectangles which are unbound controls (because they are designed for mere ornamentation). But you'll be using an image control which is a bound control (see Remou).
Change each rectangle to a text box, Control Source:
=Iif(myConditionIsMet,"ÛÛÛÛÛ","")
The "Û" is the Full Block character in Arial (asc 219).
All unbound controls in a continuous form will be the same; bound controls can be varied using conditional formatting.