The textbox is already set to MultiLine = true; How can I move to a new line in a textbox using code? Thanks
pjholliday
Posts
-
Newline in a TextBox -
SQL Query ProblemI have two tables Animal and AnimalClassification joined by a forgein key in the AnimalClassification table called HerdBookNumber. I want to count animals that have a given sire (paramSire) in each of six class types (AnimalClassification.FinalClass). The problem is that each animal could have several enteries in the AnimalClassification table and I only want the entry with the highest Lactation Number (AnimalClassification.LactationNumber) for each animal. The query below counts each entry in the AnimalClassification table not just the one with the highest lactation nubmer. NOTE: It is not the highest LactationNumber in the AnimalClassification table but the highest LactationNumber in the AnimalClassification table for the associated animal. SELECT COUNT(Animal.HerdBookNumber) AS Daughters, AnimalClassification.FinalClass FROM Animal INNER JOIN AnimalClassification ON Animal.HerdBookNumber = AnimalClassification.HerdBookNumber WHERE (((Animal.Sex)=1) AND Animal.Sire = paramSire) GROUP BY Animal.Sire, AnimalClassification.FinalClass; Could you please suggest how to get the information I require? Thanks
-
Data mergeThe datasource is not getting updated becasue you called dataset1.AcceptChanges When AcceptChanges is called all the rows in the dataset are marked as unmodified so when the data adapter assesses which rows to update, insert and delete it finds all rows are unmodified and thus thinks it does not need save them.
-
Setting AllowZeroLength using SQLI have a Microsoft Access 2000. How can I set the AllowZeroLength value for a field using an SQL statment? Thanks
-
Finding lowest integer in an Access DatabaseWhat I mean by unused number is for example I have the following numbers in my column 1 2 3 4 6 7 8 I want it to return the value 5 because that is the lowest value that does not appear in the column. Is it possible to write a query to do that?
-
Finding lowest integer in an Access DatabaseI am using a MS Access Database. Can anyone suggest some SQL to find the lowest unused number from one a column, say 'Quantity' for example? Thanks
-
Linking Database to DatasetIs there anyway of having a dataset that is linked to my access database in such a way that when the database changes the dataset automatically updates itself?
-
Drawing a Family TreeI am trying to draw a Family tree onto a panel by adding several custom panels that contain the data about each person in the tree. I have all the panels displaying but my formula for working out where to place each custom panel is placing them incorrectly. This is my formula. child is the custom panel one generation back in the tree and the index is set according to its vertical position in the generation (i.e the one nearest the top of the panel is 1 and the next lowest 2 and then next lowest 3 etc..) generation is the generation the the animal belongs to (1 being the initial person, 2 being the parents, 3 the grandparens) pw = the custom panel width, hg = the gap between generations, pd = the custom panel height, paneldepth = the main panel height I want the tree to draw left to right. The x co-ordinate works fine its the y co-ordinate that doesnt work, it causes earlier generation to be too close together. // Set Panel Location int x = child.Location.X + pw + hg; int y = ((paneldepth / (generation + 1)) * ((2 * child.Index) - 1)) - (pd / 2); parentpanel.Location = new Point(x, y); Can anyone suggest a formula that might work?
-
Comparing Strings with WildcardsI want to compare to strings, where one contains wildcards. i.e. String.Compare("LongWord", "*ongW*", true) I would want this expression to be true (Hence return 0). How to a compare two strings using wildcards? Thanks
-
Calling constructorsI have a form with three constructors each with a different signiture. i.e. public Form_1() ... public Form_1(string Name) ... public Form_1(string Name, int Number) ... How can i call the first constructor from the second and call the second from the third? At the minute I have to copy the common code into functions and call the functions but would prefer to call the constructors as i used to do in VB.Net. Thanks
-
Custom Control PropertyI have a control that includes a few buttons, a drop down and a text box. There is a property called DestinationGrid which is set at design time to be the grid the control works with. I also have another property called SelectedRow which is used to set the on the grid. Because the grid doesnt have any rows I get an error when I view the form at design time saying that SelectedRow - Object not set to an instance ... How can I stop thsi error occuring? I could remove the property and use a SetSelectedRow() and GetSelectedRow() method, but would like to use a property. Any suggestions? Thanks
-
Custom Control PropertyI have a control that includes a few buttons, a drop down and a text box. There is a property called DestinationGrid which is set at design time to be the grid the control works with. I also have another property called SelectedRow which is used to set the on the grid. Because the grid doesnt have any rows I get an error when I view the form at design time saying that SelectedRow - Object not set to an instance ... How can I stop thsi error occuring? I could remove the property and use a SetSelectedRow() and GetSelectedRow() method, but would like to use a property. Any suggestions? Thanks
-
Drawing FormsI have an mdi container form that contains a tab control down the left and when a tab is clicked it loads a form to fill the reaming area inside the mdi form. The problem I have is that when it loads you can see the form beign drawn and it looks aweful. Is there anyway that the form can be loaded without it showing each control being drawn?
-
Third Party DataGridCould you please recommend some third party datagrid controls for use in VB.NET or C#. I am looking for a grid that is: Quick to load and not too resource hungry Customizable Appearance Would prefer: Grouping ability and sorting An integrated filter would be nice but i suspect that is asking too much. I have used ComponentOne FlexGrid and was moderatly happy except it was far too slow to load. Thanks for your help
-
Best .NET report toolThanks for the suggestions, DataDynamics Active Reports where among a few i had alreay downloaded to evaluate and after spending a day using them I must agree that they are the best reports I have used so far.
-
Best .NET report toolWhen creating a report i found that the controls moved around alot when i run it depending upon how much text I placed in labels (and i dont mean multiline labels either) and it with difficult to control the displaying of subreports.
-
Best .NET report toolI am creating an application that will generate several reports. Could you please suggest some third party report creation software. I have used DevExpress's XtraReports and was not happy with them so am interested in other ways/software for creating reports using either C# or .NET Cheers