Ok, hate to be rude, but your code simply doesn't make a whole lot of sense.
Can you describe what you're trying to do, not in code, but just in simple terms? What is the original problem you're trying to solve?
Like someone already said, we don't think you need a loop to do this. A simple append query is probably all you need, but unless we understand your goal, we can't help you.
--- In AccessVBACentral@
>
> I have a request to do a loop to automate a Query that appends the -1 if the infraction didn't happen. I tried to create a module to do this and then embed this into the Home screen when the app loads. But as you can see I am lacking my VBA Skills. Can someone help me with what I am doing wrong.
>
> ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
>
> Option Compare Database
>
> Function MinusOneLoop(
>
>
> 'Dimension Variables
> Dim rs As Recordset
> Dim db As Database
>
>
> 'Loop Through Query Results
> Set rs = db.OpenRecordset(
>
> Do While rs >= 1
>
> DoCmd.OpenQuery ("qry_30Days_
>
> Loop Until rs = 0
>
>
>
> End Function
>
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Nenhum comentário:
Postar um comentário