Search results

  1. S

    Non related tables in a query

    Hi, I am not sure I understand the table structure. But I will give this a try anyway. If these tables have the same sort of information you could use a union query: Select 1 AS IsUSCitizen, SSN AS ID, Name, Access From Table_1 UNION ALL Select 0 AS IsUSCitizen, IDnumber AS ID, Name, Access...
  2. S

    How to calculate mean and standard deviation?

    Don't bother with code, use views. If you don't insist on considering 0 values it is very easy - a simple query. Select Avg(SalesQty) As AverageSQty, Stdev(SalesQty) As StdSQty From Sales Where SalesDate > 10 AND SalesDate < 20 If you have to have 0's it is still doable but more tricky. I...
  3. S

    Append & Delete

    Are you sure this is what you want to do? It is quite rare to store data twice in a database. If it is just about displaying data in a certain way you can do it with a select query and a form. If you want to actually modify your data (eg. set certain values to Null) it is usually an Update...
  4. S

    Trapping an error

    What I would do is first get the error and see the error code. I would make an error trapping something like this: Private Sub Insert_Click On Error Goto Err_Insert_Click On Error Resume Next Insert ...... On Error Goto Err_Insert_Click If Err=xxxx Then MsgBox "Nope" Exit sub End if...
  5. S

    restricted search facility

    You should filter the recordset of the form for the UserID when loading the form (eg. with a parameter query). As John sais when you load this form you should already know who the user is. If you don't know who the user is create a login form where he can specify his username and password, if...
  6. S

    Adding up the cost of each item stored in a subform

    Ye, there is always a bigger fish. I knew that there should be a control based solution but I couldn't tell what that would be....
  7. S

    min, max, restore buttons

    Its not for preventing. This form acts like a desktop. Frome here the user can open different other forms. When he finished working with these forms they close them and return to the desktop. The form is my central display containing a Treeview where the user can create a selection by clicking...
  8. S

    Re: reference a nested subform control in the subform

    Are you sure it is the reference to the control? I don't think you could check for Null value this way. Use the If IsNull(MyControl)=False Then ...... End If function instead. hth. SWK
  9. S

    Adding up the cost of each item stored in a subform

    Well, I would just run a separate query to calculate sum. The other thing that comes to my mind is working with the recordset of the subform. A nicely packed version of this is on http://support.microsoft.com/default.aspx?scid=kb;en-us;Q210338 hth SWK
  10. S

    min, max, restore buttons

    Uhm, sorry its just a form that I called Swithchboard because it is always open and displays the current status of the application, but it is not created with a wizard if that is what you meant. I am completely stuck with this: open a form so that it occupies the whole screen, doesn't have min...
  11. S

    min, max, restore buttons

    Thanks. I've tried that. Currently the form properties are set to BorderStyle=Dialog ControlBox=No MinMaxButton=No ClosseButton=No I think one of the problem comes from the DoCmd.OpenForm "SwithchBoard" command. It opens the form in Normal mode. The restore button is there when the form is...
  12. S

    min, max, restore buttons

    Hi, I am opening a form functioning as a Switchboard from code (from the Login form). I would like to have the Switchboard no min, max and restore buttons but to occupy the full screen. I can do this if there are no menubars, but I have a custom menubar that I need to display. I've read the...
  13. S

    Vertical scrollbar only if needed

    That is a good idea hooks. Thanks. SWK
  14. S

    deleting records recursively

    I've got SQLServer2000 as the backend and as far as I can see you can't have recursive cascade because any one table can appear only once in a cascade path. I could do it with triggers, but I don't like them. Besides that way all sorts of other problems would come up (eg. if I have a...
  15. S

    deleting records recursively

    I am trying to delete a record and all of its children recursively, but I had no success so far. Below is what I tried. Thanks for the help. SWK Public Sub DeleteJobGroupHeader(JobGroupHeaderID As Integer) Set cn = CurrentProject.Connection 'Find all the children SQLstring = _ "Select...
  16. S

    Delete query comparing multiple columns

    Sorry, I think I've got it now: Delete From AllRecords a Where (Not Exists (Select * From MustStay m Where a.ID1=m.ID1 AND a.ID2=m.ID2))
  17. S

    Delete query comparing multiple columns

    I would like to delete records from one table that are not present in a query. I can solve the scenario when I need to compare one column: Delete From AllRecords Where AllRecords.ID Not In (Select ID From MustStay) However I cant solve this same scenario when the ID is composed of two...
  18. S

    first row of data in a graph not displayed

    I have a graph in a report. The graph doesn't display the first row of data. If I open the Chart's Datasheet I can see that the data is there in the first row. Interestingly the first row is not numbered in the datasheet. If I drag all the data down one row the chart becomes correct, however...
  19. S

    executing an equation stored as a text

    This is how I imagine it now. You don't think this could work? EqString="(((a1+a2/a3)-(a2+a4^a5*(a4/a1))+a3)/a6)" For each variable (I can scan the string for possible variable names) Replace each variable with its value as a string operation Next Debug.Print EqString 'eg...
  20. S

    executing an equation stored as a text

    That is right, I need to be able to pass any number of variables to the equation. pdx_man - Does it really need to be that difficult? Let's not worry about syntax checking now. I could perhaps do some symple text manipulation: put the variable values in a recordset than replace all a1, a2 to...
Back
Top Bottom