370 Posted Topics
Re: what do you want to search, table, the file system, a list box? | |
Re: TeachLoad is a calculated field, so delete the first "teach.TeachLoad," and delete "teach." after the AS. also I suspect your final field reference in the join should be Staff.StaffNo=Semester.StaffNo. | |
Re: You cannot do this as autonumber, it utilises a long integer data type. If you are adding the data using a form you can add code to the Before_Insert event to generate the number for you. if you moved to SQL-Server for the database engine you could add a trigger … | |
Re: Setting the KeyPreview property of the Form will enable the Form to process the KeyDown event before any controls on the form do. | |
Re: If you are using the SQL, you may like to investigate using the RecordsAffected property to determine whether the row was deleted and inform the user accordingly. | |
Re: what is the field type you are storing in. It should be text if you want the exact pattern stored. | |
Re: I am guess there is a key violation, or some other data validation error, ie you are not entering data in a field marked as mandatory in the table. so the record is not being saved. Go through the table definition an check each field to ensure you know all … | |
Re: use .Find method to look to see for a record with the same value the .NoMatch property will tell you whether the record exists or not | |
Re: I am guessing you are not in the C: root when you execute, ie the TestFolder is being created under the folder you are in when execute. | |
Re: Why not add a command button that has code something like. [CODE] Hours = 2 Minutes = 0 Seconds = 0 Time = TimeSerial(Hours, Minutes, Seconds) Text1.Text = "2" Text2.Text = "0" Text3.Text = "0" Timer1.enabled = true [/CODE] also at line 84 why not say if label1.caption <> "00:00:00" … | |
Re: "N" & format$(val(right$(SerialNo,4))+1,"0000") | |
Re: [CODE]SELECT a, Count(a) AS CountOfa1 FROM (SELECT Table1.a, Table1.b, Table1.c, Count(Table1.a) AS CountOfa FROM Table1 GROUP BY Table1.a, Table1.b, Table1.c) GROUP BY a; [/CODE] This will return the number of combinations of "b" and "c" for each "a" | |
Re: you could add an audit trail, keep track of who did which transactions when. | |
Re: Find code below however this may not be the best way of achieving what you want. In the LostFocus event, you can check if they have entered a valid date as follows [CODE] if not isdate(text1.text) then msgbox "Please enter a valid date" text1.setfocus text1.selstart = 0 text1.sellength = len(text1.text) … | |
Re: In line [CODE] Set rsTesteSQL = DBTesteSQL.OpenRecordset("SELECT * FROM test", dbOpenTable, 0, dbOptimistic) [/CODE] dbOpenTable applies to Jet databases only. Try dbOpenDynaset instead. | |
Re: Presumeably you are reading it into an integer variable, which, when you print it will be displayed, by default, in decimal | |
Re: You want to be careful doing this, it can put quite a strain on the database in a multiuser environment causing performance issues. Order your table by LastName and use a find first to locate the first row that matches rather than requerying the table with each keystroke. | |
Re: There are plenty of off-the-shelf inventory control products that can do this better and cheaper than writing something yourself. If your requirements are simple there is bound to be some freeware available. | |
Re: Replace first line with [CODE] Dim arrWhite(rs.Fields.Count - 1) As Double [/CODE] | |
Re: If you want to go low level and have a printer direct connected to the a printer port (no idea how it handles USB) you can write to it directly as follows [CODE] Open "PRN" For Output As #1 Print #1, "Here is line one" Print #1, "Here is a … | |
Re: Have you tried binding the text box to a column in the datasource that supplies the datagrid. | |
Re: Inside the if/then you should set KeyAscii = 0 since you have handled it. however I don't think that will fix your error. have you tried hitting the Tab key and seeing what happens. Have a look at what is next in the tab order after the text box, | |
Re: If you are only interested in valid combinations then it is more user friendly to restrict the population of the second combo [CODE] RS.Open "SELECT UNIQUE FirstName FROM tblrecords WHERE LastName='" & combo1.Text & "'", cn, adOpenStatic, adLockOptimistic [/CODE] Also using the UNIQUE keyword will return only one instance of … | |
Re: This seems strange when I click "no" it does not append. You can handle it manually if you wish which will overcome the problem. [CODE] If MsgBox("are you sure you want to append these records", vbYesNo) = vbYes Then DoCmd.SetWarnings False DoCmd.OpenQuery "Query4" DoCmd.SetWarnings True End If [/CODE] | |
Re: If all three tables have the same primary key then all of the fields should be in the one table. There is no point in having them in separate tables. | |
Re: A text field will allow alpha numeric input. You can put a mask on it to specify the format of the input but personally I wouldn't, I don't find them particualarly user friendly. | |
Re: I think you will find that SQL uses the american date format mm/dd/yyyy, I usually find it safer to use dd-mmm-yyyy eg 14-jun-2010 | |
Re: Doesn't sound like you should be storing the second date in a field, put a text box on the screen and in its control source put the expression =dateadd("m",1, me.firstdate) | |
Re: You should not be storing the total in the database it is a derived value and should be calculated on the fly as you need it. Storing derived values increases the complexity of your application and provides for data inconsistencies to arise. For example, if they don't balance how do … | |
Re: If you have linked the form and subform using the Link Child and Master field properties (see attachment) then you should not be setting the Id in the child form, it will be populated automatically for you from the Master. For the second problem you are better to set up … | |
Re: Perhaps you could driving it off the parent form. If you are displaying the child form as a result of clicking a button, include in there the code. You will need to alter the image assignment statement Me.mysubform.Image1.Picture = ImageLogoPath | |
Re: [code] SELECT TOP 10 StudentName, StudentMark FROM StudentResults ORDER BY StudentMark DESC; [/code] | |
Re: another approach Retrieve your combo box values from a table with 2 columns as follows cm,A inches,A mm,A lbs,B kg,B g,B etc the source query for combo 2 should contain both columns with a condition on the second column of the value of the first combo, eg Forms![myform].combo1 in the … | |
Re: I am not a C# programmer but something like below adjusted if necessary for C# WHERE Shift.SDate >=#" + format$(tbStartDate.Text,"mm/dd/yy") + "# and Shift.SDate <=#" + format$(tbEndDate.Text,"mm/dd/yy") + "#"); | |
Re: with 9 boolean variables that is 512 combinations If you are not into maths this is going to freak you out a bit but the best approach is to resort to binary. An integer in binary form consists of a series of 1s and 0s that can represent your 9 … | |
Re: most things are possible. how much money do you have? | |
Re: is "id" a numeric field? | |
Re: just install .NET 2.0! you are creating a support nightmare by trying to cobble together some references. | |
Re: You are better to put a OrderCancelledDate field in the table. It provides more information to the user. If is is null then the order has not been cancelled. | |
Re: perhaps you need to check the data types of each of the elements in the table. | |
Re: Here is a piece of code that does something similar to what you want I thnk. [CODE]Dim WhereClause As String Dim AndStr As String AndStr = "" If Me.SearchName <> "" Then WhereClause = "(FirstName like '*" & Me.SearchName & "*' OR Surname like '*" & Me.SearchName & "*')" AndStr … | |
Re: if you posted it in a format that I could read you would stand a much better chance of an answer | |
I have this problem from time to time, and at the moment. I set a breakpoint in the code to debug. I remove the breakpoint after I am finished but the program still pauses at that point. Press F5 and it continues fine. Close the database and reopen it and … | |
Re: units sold is the quantity which is why you are getting the same answer. are you sure the problem is not best selling products by price and quantity. | |
Re: <> is not equal to Unless I am going senile there are no circumstances where three lengths cannot make a triangle. | |
Re: Why don't you write an update SQL to update the table directly rather than bring it into a ds. eg UPDATE DurexBOL SET WebSvc=Yes WHERE WebSvc=No below is the code from the vb help file for executing non-query SQL [Code] Public Sub CreateCommand(ByVal queryString As String, _ ByVal connectionString As … | |
Re: I think you should have ActiveSheet in the assignment line (12) [Code] ExcelSheetFO.ActiveSheet.Cells(2, i) = "Some value" [/code] | |
Re: Have you considered using either an array (choice 1) or a collection (choice 2) that you can iterate through [code] 'choice 1 Dim i As Integer Dim tbarray(10) As TextBox For i = 0 To Val(Form1.ChannelTextBox1.Text) - 1 ' set your values Next i 'choice 2 Dim tblist As New … | |
The End.