User Profile

Collapse

Profile Sidebar

Collapse
limweizhong
limweizhong
Last Activity: Jun 20 '12, 01:29 PM
Joined: Dec 6 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • No what I meant is that instead of storing your yes/no responses for different questions in separate columns you store it in separate rows, so each row becomes exactly one response, for a user, for a question. Like:
    Code:
    Person ID, Question No., YesNoResponse, TextualResponse
    1          1             Y
    1          2             N
    1          3             Y
    2          1             N
    2          2             N
    ...
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to TEMP file UPDATE query VBA
    If you have Microsoft Access, build the query using the query design view, pulling in the tables, joining them, and changing the query type to *make-table* and dragging in the fields that you want (all the fields except one of the fields you joined on). Then change the view to SQL view, and you can copy the SQL code. You can remove all the extra sets of round brackets that Access tends to insert.
    See more | Go to post

    Leave a comment:


  • In my opinion, you might be better off storing the survey data like that:
    Person ID, Question No., YesNoResponse, TextualResponse

    It would allow counting using an aggregate function.
    See more | Go to post

    Leave a comment:


  • If you are dynamically generating reports, there might be a way to use the in-built Access commands to make the form (form wizard but with parameters specified automatically), and apply themes to it (in Access 2007). But you will need to refer to the MSDN documentation. I don't know enough to help you there, sorry.
    See more | Go to post

    Leave a comment:


  • That might be do-able with a macro, but it all depends on how you want the report to be laid out. If you have a fixed *number* of columns, then you might just put the text-boxes all laid out nicely, then dynamically change the ControlSource to the right field name using a macro that runs when the report loads. Otherwise, you must have a macro somewhere else, that dynamically changes the report *design*, and then opens the report with the new design....
    See more | Go to post

    Leave a comment:


  • Assume you have the original query in Query1. You don't put that in the RecordSource of the Report. You first create another query, say Query2, and inside that query, you do the appropriate filters with the reference to the control in the form, say Forms.Form1.Tex t1. When you have the form open, and run the query, you can see if it works. Then you set the RecordSource of the Report to Query2. Or you could copy the SQL of Query2 into the RecordSo...
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to Need help for improvement.
    in Java
    Also, this is a simple integral knapsack problem that also can be solved by dynamic programming.
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to Need help for improvement.
    in Java
    You're not "[going] through all 8 digits" as you stated in the pseudo-code. If you go through only 3 digits, it will be only the last 3 digits of the binary numbers from 0 to 255 and thus this will contain many repeats, because the last 3 digits of 8n + k will be the same as k for all n. Moreover, if you input 9, your answer will be wrong. You must calculate the number to put in place of 256, i.e. 2 ^ input
    See more | Go to post

    Leave a comment:


  • I think you might have the RecordsetClone property if you are using Access 2007. You can try that in place of the Recordset property...

    Or you can Set Rst=Form_frmSta tments_subform. Recordset.Clone ().

    Edit: OK, RecordsetClone is also available in previous versions of Access.
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to Need help for improvement.
    in Java
    There are no repeats in the binary representation of numbers 0 to 255, so based on your "pseudo-code", there should be no repeats. It's probably not your output code then. Anyway if you did type out exactly string += "+" + i + " "; in line 9 of your output code it should have worked. Please try without assuming.
    See more | Go to post

    Leave a comment:


  • Try using the child form's recordset, e.g. Child0.Form.Rec ordSet, but it might actually affect the record selector's position in the child form. Best way might be to do a separate query.

    Edit: Yes it is really the displayed recordset in the form, so you might want to call Child0.Form.Mov eFirst before and after your cycling through all the records.
    See more | Go to post

    Leave a comment:


  • Use a reference to the control in the form in the query itself, e.g. in the criteria row, put something like forms.form1.text0 where form1 and text0 are the form name and field name respectively.
    See more | Go to post

    Leave a comment:


  • The SQL clause "insert into" is for an append query. Use the "update" clause instead. Why don't you create a simple update query in the query design view first, and then switch to SQL view to see how the "update" clause is written?
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to Need help for improvement.
    in Java
    It's not clear what you mean by "duplicates ", but as for the output format, a positive number converted to a string will not have the + sign by default. If you wanted a +, you can add it yourself, like "+" + i + " ";
    See more | Go to post

    Leave a comment:


  • If there's some property called InputMask, and it's like Access, then putting 00\/00\/0000 in there (backslash-forward-slash will treat the forward-slash as a literal character) might work... not sure about C#.

    Edit: maybe you could look at http://en.csharp-online.net/MaskedTe..._Mask_property. It's actually called the Mask property.
    See more | Go to post

    Leave a comment:


  • limweizhong
    replied to trouble in nested if statement
    in PHP
    Well... if $zone is "Manila", it will always go into the last if statement, because $vehicle="Merce dez Benz AT" is an assignment statement that assigns $vehicle to "Mercedez Benz AT" and evaluates to "Mercedez Benz AT", which converts to true. Actually all your if statements would be executed when $zone is equal to "Manila". I think you mean $vehicle=="Merc edez Benz AT".

    But...
    See more | Go to post

    Leave a comment:


  • Yes, NeoPa's correct. There's a distinction between an object instance and a variable which refers to it. When you declare the variable of a certain object type, you're not declaring that it IS the object, but rather, that it refers to an object of that type. That is why you can use a variant or an object of the generic Object type to hold just about any object (of any type).

    Note that when you declare an variable with an object type...
    See more | Go to post

    Leave a comment:


  • Your solution also will. It's similarly exponential. If you're talking about stack space, in the recursive solution, stack space used is linear in number of characters.
    See more | Go to post

    Leave a comment:


  • You first need the field(s) to be case sensitive, as Rabbit mentioned, then you might want to list all the abbreviations in a separate table, then replace all non-alphabet characters with " " using a CLR function, adding " " to the front and back, then joining to your abbreviations table using a join condition that looks like field1 like "% " + field2 + " %".
    See more | Go to post

    Leave a comment:


  • I don't see anything in that link that talks about destroying objects. However, take a look at this link, under "Garbage Collection and the Finalize Destructor". It seems that (at least in VB6), the technique used is "Reference Counting", which means that once there are no object variables referencing an object instance, the object instance is destroyed, so in your case, the object should be destroyed once it's removed from the...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...